Prev: 6510 Up: Map Next: 6535
6519: Print Room Graphic
Input
IX Pointer to room image data
PrintRoomGraphic 6519 LD B,$10 Count 10 display-file blocks (passes) and point H at 40, the first block of the top third of the display file.
651B LD H,$40
Each pass fills one 256-byte block of the display file: pixel line n of all eight character rows in the top or middle third. H is the high byte of the screen address, so the 10 values 40-4F are pixel lines 00-07 of the top two thirds (128 pixels high, matching 10 attribute rows).
PrintRoomGraphic_Loop1 651D LD L,$00 Start a new pass.
PrintRoomGraphic_Loop2 651F LD E,(IX+$00) Read the next (offset,byte) pair into DE.
6522 LD D,(IX+$01)
6525 INC IX
6527 INC IX
6529 LD A,E A 00,00 pair ends this pass.
652A OR D
652B JR Z,PrintRoomGraphic_Step1
652D LD L,E Set L to the offset and write the pixel byte there, then read the next pair.
652E LD (HL),D
652F JR PrintRoomGraphic_Loop2
PrintRoomGraphic_Step1 6531 INC H Move to the next display-file block until all 10 passes are done.
6532 DJNZ PrintRoomGraphic_Loop1
6534 RET Return.
Prev: 6510 Up: Map Next: 6535