Prev: 43585 Up: Map Next: 43610
43595: Move Up A Line
Used by the routines at ScrollAreaLeft, PrintCharacter, DrawPicture and DrawFrameLeft.
Moves a screen address up by one pixel line.
Input
HL The screen address
Output
HL The screen address of the pixel line above
MoveUpALine 43595 LD A,H Fetch the high byte of the address.
43596 DEC H Move up a pixel line.
43597 AND %00000111 Keep the number of the pixel line which it was in.
43599 RET NZ Return unless that was the top pixel line of a character row.
43600 LD A,L Fetch the low byte of the address.
43601 SUB 32 Move up a character row.
43603 LD L,A Store it.
43604 RET C Return if the row was at the top of a section of the screen.
43605 LD A,H Fetch the high byte of the address.
43606 ADD A,8 Move to the bottom pixel line of the character row.
43608 LD H,A Store it.
43609 RET Return.
Prev: 43585 Up: Map Next: 43610