Advertisement
wolfboyft

Is this a good random routine? [Taken from pokecrystal]

Jul 28th, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Random::
  2.     push bc
  3.  
  4.     ld a, [rDIV]
  5.     ld b, a
  6.     ld a, [RandomAdd]
  7.     adc b
  8.     ld [RandomAdd], a
  9.  
  10.     ld a, [rDIV]
  11.     ld b, a
  12.     ld a, [RandomSub]
  13.     sbc b
  14.     ld [RandomSub], a
  15.  
  16.     pop bc
  17.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement