How to seed to generate random numbers?

After some searching through ancient asm source code archives of mine I found this for x86 MSDOS NASM platform I was using back in the days: ;.rnd ;al=rnd num <0,ah>; .rnd: pusha mov cx,ax .rnd0: mov bx,[cs:.rnddat] mov ax,[cs:.rndtim] xor al,bh add ah,bh rcr ax,3 xor al,bl rcl ax,2 .rnd2: cmp al,ch jbe .rnde sub … Read more