Prev: E84E Up: Map Next: E897
E87A: Copy a graphic onto screen
Used by the routines at DBEE, DE87, E84E and F021.
Input
HL Address of the graphic
DE Co-ordinates to place the graphic
B Width
C Height
E87A LD A,C Put the height in A and store it in the shadow register.
E87B EX AF,AF'
E87C LD C,$08 8 rows to draw per UDG cell.
E87E PUSH DE Remember the co-ordinates.
E87F CALL $E8F1 Convert this to a screen address in DE.
E882 PUSH BC Remember the screen address and dimensions.
E883 PUSH DE
E884 LD A,(HL) Copy the graphic byte.
E885 LD (DE),A
E886 INC E Move forward a cell.
E887 INC HL Move forward a column in the data.
E888 DJNZ $E884 Loop back if there are more columns to draw.
E88A POP DE Restore the screen address.
E88B INC D Move to the next column.
E88C POP BC Restore the dimensions.
E88D DEC C Move to the next UDG cell.
E88E JR NZ,$E882 Loop back if there is more to draw.
E890 POP DE Restore the co-ordinates.
E891 DEC E Move to the next row.
E892 EX AF,AF' Restore height left to draw and move down a row.
E893 DEC A
E894 JR NZ,$E87B Loop back unti all rows are done.
E896 RET
Prev: E84E Up: Map Next: E897