This commit is contained in:
2021-01-08 04:37:03 +01:00
parent c29ed0580a
commit 228856c26d
16 changed files with 5 additions and 466 deletions

View File

@@ -12,8 +12,10 @@
; S = R - 1
; an 8-bit unsigned integer
.area _CODE
_random::
ld a, (_seed)
ld a, (_random_seed)
ld b, a
rrca ; multiply by 32
@@ -24,6 +26,6 @@ _random::
add a, b
sbc a, #255 ; carry
ld (_seed), a
ld (_random_seed), a
ld l, a
ret