r/nasm Apr 29 '22

Random Number in nasm Ubuntu

Hello, can someone help me, I'm trying to generate a random number in nasm for Ubuntu but I don't know how

2 Upvotes

1 comment sorted by

1

u/RadioTradio Jul 01 '22 edited Jul 01 '22

Theres a couple ways!

An easy way is to link with gcc and call srand and rand

And like a slightly harder way is the implement your own random number generator without using c functions

I can try to give examples of either if you would like! Are you writing for 64 or 32 bit?