![]() |
Routines |
| Prev: B3F2 | Up: Map | Next: B414 |
|
Used by the routine at UpdateShot.
Chooses a step of FF, 00 or 01 at random, with zero twice as likely as the others.
|
||||||||
| ChooseRandomStep | B403 | LD A,($9BCC) | The second random byte. | |||||
| B406 | AND %00000011 | Keep the bits of A that are set in 03. | ||||||
| B408 | LD B,$00 | Clear B. | ||||||
| B40A | CP $02 | Return if A is less than 02. | ||||||
| B40C | RET C | |||||||
| B40D | DEC B | Step B back. | ||||||
| B40E | CP $03 | Return if A is 03. | ||||||
| B410 | RET Z | |||||||
| B411 | INC B | Advance B. | ||||||
| B412 | INC B | Advance B. | ||||||
| B413 | RET | Return. | ||||||
| Prev: B3F2 | Up: Map | Next: B414 |