Prev: 25872 Up: Map Next: 25909
25881: Print Room Graphic
Input
IX Pointer to room image data
PrintRoomGraphic 25881 LD B,16 Count 16 display-file blocks (passes) and point H at 64, the first block of the top third of the display file.
25883 LD H,64
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 16 values 64-79 are pixel lines 0-7 of the top two thirds (128 pixels high, matching 16 attribute rows).
PrintRoomGraphic_Loop1 25885 LD L,0 Start a new pass.
PrintRoomGraphic_Loop2 25887 LD E,(IX+0) Read the next (offset,byte) pair into DE.
25890 LD D,(IX+1)
25893 INC IX
25895 INC IX
25897 LD A,E A 0,0 pair ends this pass.
25898 OR D
25899 JR Z,PrintRoomGraphic_Step1
25901 LD L,E Set L to the offset and write the pixel byte there, then read the next pair.
25902 LD (HL),D
25903 JR PrintRoomGraphic_Loop2
PrintRoomGraphic_Step1 25905 INC H Move to the next display-file block until all 16 passes are done.
25906 DJNZ PrintRoomGraphic_Loop1
25908 RET Return.
Prev: 25872 Up: Map Next: 25909