Prev: 44630 Up: Map Next: 44673
44657: Screen Address One Pixel Above
Used by the routines at Clear_Play_Area, Draw_Line and Draw_Line_Step.
Moves a display file address up by one pixel line.
Input
HL Display file address
Output
HL Display file address of the line above
ScreenPosition1PixelAbove 44657 DEC H Move up a pixel line.
44658 LD A,H Copy H to A.
44659 CPL Flip all of the bits.
44660 AND 7 Keep only the line number within the character.
44662 RET NZ Return if a character boundary has not been crossed.
44663 LD A,L Copy L to A.
44664 SUB 32 Move up a character row.
44666 LD L,A Store the result in L.
44667 RET C Return if the subtraction borrowed.
44668 LD A,H Copy H to A.
44669 ADD A,8 Add 8.
44671 LD H,A Store the result in H.
44672 RET Return.
View the equivalent code in;
Prev: 44630 Up: Map Next: 44673