Prev: 6000 Up: Map Next: 604D
6007: Routine at 6007
Used by the routine at 6000.
ENTRY 6007 LD HL,$581F HL=581F.
600A LD DE,$001F DE=001F.
600D LD B,$0F B=0F (counter).
LOOP 600F LD A,(HL)
6010 AND %00111000 Keep only bits 3-5 (PAPER).
6012 RRA Shift the PAPER bits to the "front".
6013 RRA
6014 RRA
6015 LD C,A Store the result in C.
6016 LD A,(HL)
6017 AND %11111000 Keep only bits 3-7 (PAPER, BRIGHT and FLASH bits).
6019 OR C Set the bits from C.
601A INC HL Increment HL by one.
601B LD (HL),A Write A to *HL.
601C ADD HL,DE HL+=DE.
601D DJNZ LOOP Decrease counter by one and loop back to LOOP until counter is zero.
601F CALL $6E89 Call 6E89.
6022 LD A,($5B21)
6025 BIT 3,A
6027 CALL Z,$6DD0
602A LD BC,$0100 Copies 0100 bytes of data from 5800
602D LD HL,$5801
6030 LD DE,$5800
6033 LDIR
6035 LD BC,$0800 Copies 0800 bytes of data from ...
6038 LD HL,$4001
603B LD DE,$4000
603E LDIR
6040 BIT 3,A
6042 CALL Z,$6D09
6045 LD A,($5B21)
6048 BIT 3,A
604A CALL NZ,$6DD0
Prev: 6000 Up: Map Next: 604D