Prev: 44180 Up: Map Next: 44236
44198: Copy Display Data To Display Buffer
Used by the routine at CopyDisplayIfNeeded.
Copies display data from the character data structure to the display buffer at 43688. If bit 6 of E is set, copies from offset 4; if bit 7 of E is set, copies from offset 14. Always sets bit 0 of the return value.
Input
E Flags (bits 6 and 7 indicate which display data set to copy)
Output
A Bit 0 is set if data was copied
CopyDisplayDataToDisplayBuffer 44198 BIT 6,E Jump ahead to CopyDisplayDataToDisplayBuffer_Next if bit 6 is clear.
44200 JR Z,CopyDisplayDataToDisplayBuffer_Next
44202 RES 6,E Clear the marker.
44204 PUSH DE Keep DE, take offset 4 and join the copy at CopyDisplayDataToDisplayBuffer_AddOffset.
44205 LD DE,4
44208 JR CopyDisplayDataToDisplayBuffer_AddOffset
Bit 7 selects the second display block.
CopyDisplayDataToDisplayBuffer_Next 44210 BIT 7,E See whether bit 7 of the low byte of the source is set.
44212 RET Z Return if that marker is clear.
44213 RES 7,E Clear bit 7 and take offset 0014, keeping DE.
44215 PUSH DE
44216 LD DE,14
CopyDisplayDataToDisplayBuffer_AddOffset 44219 PUSH IY Use the buffer: co-ordinate header (43688).
44221 POP HL
44222 ADD HL,DE
44223 LD DE,43688
44226 EX DE,HL
44227 LD BC,10 Take a length of 10 entries and copy these bytes across.
44230 LDIR
44232 POP DE
44233 OR %00000001 Reset the zero flag.
44235 RET Return.
View the equivalent code in;
Prev: 44180 Up: Map Next: 44236