Prev: 64878 Up: Map Next: 64906
64883: Cheat / debug routine: Decrease Magic Knight's current room index by 1, wrapping around to 51 if below zero
Used by the routine at 64836.
64883 LD A,(23702) Load A with index of Magic Knight's current room...
64886 DEC A ...minus 1
This entry point is used by the routines at 64906, 64912 and 64919.
64887 OR A If new room index is not less than zero...
64888 JP P,64893 ...then skip ahead to 64893
64891 ADD A,52 Add 52 to new room index (wrap 0 to 51)
64893 CP 52 If new room index is less than 52...
64895 JR C,64901 ...then skip ahead to 64901
64897 SUB 52 Subtract 52 from new room index (wrap 51 to 0)
64899 JR 64893 Loop back to 64893
64901 LD (23702),A Store Magic Knight's new room index
64904 JR 64878 Draw Magic Knight's current room then jump back into cheat routine main loop
Prev: 64878 Up: Map Next: 64906