Changes

Jump to: navigation, search

Programming:Random Number Generator

199 bytes added, 21:11, 8 January 2016
/* 8-bit random number generator using Refresh Register (R) */
<pre>
.rnd ;-----> Generate a random number ; ouput a=answer 0<=a<=255 ld hl,(seed_ion) ld a,r ld b d,a ld e,a add hl,(seed)de xor b l add a xor b h ld l,a ld (seedseed_ion),ahl ret seed_ion: .seed db 0dw 0x0
</pre>
423
edits