Prev: A8CD Up: Map Next: A97E
A955: main_loop_18
Used by the routines at main_loop and cpu_driver.
main_loop_18 A955 LD A,($A248) Return if var_a248 is zero
A958 AND A
A959 RET Z
A95A LD A,($A254) Return if #$A254 is zero
A95D AND A
A95E RET Z
A95F LD DE,$ED28 Point DE at (something above the stack)
A962 CALL rng Call rng
A965 AND A Stack 1 if it's +ve or zero, or 2 if it's -ve
A966 LD A,$01
A968 JP P,main_loop_18_0
A96B INC A
main_loop_18_0 A96C LD (DE),A
A96D CALL rng Call rng
A970 INC DE Stack that random byte
A971 LD (DE),A
A972 LD A,$01 Self modify 'LD A' @ main_loop_20 to load 1
A974 LD ($A97F),A
A977 LD ($C0BC),A Self modify 'LD A' @ rm_c0bb to load 1
A97A LD ($A9DF),A Self modify 'LD A' @ sub_A9DE to load 1
A97D RET Return
Prev: A8CD Up: Map Next: A97E