Prev: 59338 Up: Map Next: 59403
59365: Routine at E7E5
Used by the routines at 53982, 54943 and 59649.
59365 LD A,R A=the contents of the Memory Refresh Register.
59367 PUSH AF Stash AF on the stack.
59368 DI Disable interrupts.
59369 LD B,2 B=2.
59371 PUSH BC Stash BC on the stack.
59372 LD BC,5000 BC=5000.
59375 DEC BC Decrease BC by one.
59376 LD A,B Jump to 59375 until BC is equal to 0.
59377 OR C
59378 JR NZ,59375
59380 LD HL,22528 HL=22528 (screen buffer location).
59383 LD BC,768 BC=0768.
59386 LD A,(HL) A=*HL.
59387 XOR %01111111 Flip bits 0-6.
59389 LD (HL),A Write A to *HL.
59390 INC HL Increment HL by one.
59391 DEC BC Decrease BC by one.
59392 LD A,B Jump to 59386 until BC is equal to 0.
59393 OR C
59394 JR NZ,59386
59396 POP BC Restore BC from the stack.
59397 DJNZ 59371 Decrease counter by one and loop back to 59371 until counter is zero.
59399 POP AF Restore AF from the stack.
59400 RET PO Return if BC has odd parity (P flag is reset).
59401 EI Enable interrupts.
59402 RET Return.
Prev: 59338 Up: Map Next: 59403