Prev: 38242 Up: Map Next: 38356
38296: Scroll hand cursor up a unit
Used by the routine at 37497.
38296 LD A,(23491) Load y-coordinate of top of hand cursor into A
38299 LD C,A Copy into C
38300 LD DE,26064 Point DE at table of display file addresses of starts of each pixel row
38303 LD H,0 Load y-coordinate into HL...
38305 LD L,A ...
38306 ADD HL,HL Double it
38307 ADD HL,DE And add as offset to table of display file addresses of starts of each pixel row
38308 PUSH HL Transfer value into IX...
38309 POP IX ...
38311 LD A,(23492) Load y-coordinate of bottom of window into A
38314 SUB C Subtract y-coordinate of top of hand cursor
38315 DEC A Decrease by one, so now holds distance between top of hand cursor and bottom of window
38316 EX AF,AF' Exchange A register
38317 LD A,(23490) Load x-coordinate of left of interior of window (characters) into A
38320 LD C,A Copy into BC...
38321 LD B,0 ...
38323 EX AF,AF' Switch A register
38324 EX AF,AF' Switch A register (now holds y-coordinate of top of interior of window on first pass)
38325 INC IX Advance IX by two bytes...
38327 INC IX ...
38329 LD L,(IX+0) Load HL with display file address of start of pixel row 1...
38332 LD H,(IX+1) ...
38335 LD E,(IX+2) Load DE with display file address of start of pixel row 2...
38338 LD D,(IX+3) ...
38341 ADD HL,BC Add x-coordinate of left of interior of window to display file address
38342 EX DE,HL Swap addresses
38343 ADD HL,BC Add x-coordinate of left of interior of window to display file address
38344 EX DE,HL Swap addresses back (HL points to upper row and DE points to lower row)
38345 LD A,(DE) Read display file data from lower row...
38346 LD (HL),A ...and copy into upper row
38347 INC DE Increase DE and HL (as hand cursor is two characters wide)...
38348 INC HL ...
38349 LD A,(DE) Read display file data from lower row...
38350 LD (HL),A ...and copy into upper row
38351 EX AF,AF' Swap A register (holds remaining distance between top of hand cursor and bottom of window)
38352 DEC A Decrease A, as one less pixel row to scroll up
38353 JR NZ,38324 Loop back to 38324 for next pixel row
38355 RET Return
Prev: 38242 Up: Map Next: 38356