Prev: D679 Up: Map Next: D69A
D67C: Copy a rectangle of the buffer to the display
Works up the screen a row at a time, the same way as update_screen, but leaves the buffer as it is. Used for the wiped areas at the end of a frame and by the status area, which draws into the buffer and copies its own parts out.
Input
HL the buffer address of its bottom-left byte
DE the display address of the same byte
B the height in rows
C the width in bytes
blit_to_screen D67C PUSH BC one row: B is cleared so that LDIR copies C bytes
D67D PUSH DE
D67E PUSH HL
D67F LD B,$00
D681 LDIR
D683 POP HL the buffer row above is 32 bytes on
D684 LD DE,$0020
D687 ADD HL,DE
D688 POP DE
D689 DEC D up a display line, unless that crossed a character row
D68A LD A,D
D68B CPL
D68C AND $07
D68E JR NZ,blit_next_row
D690 LD A,E crossing a character row: back 32 in E, and back into this third unless that borrowed
D691 SUB $20
D693 LD E,A
D694 JR C,blit_next_row
D696 LD A,D
D697 ADD A,$08
D699 LD D,A
Prev: D679 Up: Map Next: D69A