![]() |
Routines |
| Prev: 38296 | Up: Map | Next: 38417 |
|
Used by the routine at 37523.
|
||||
| 38356 | LD A,(23492) | Load y-coordinate of bottom of window (pixels) into A | ||
| 38359 | LD C,A | Copy into C | ||
| 38360 | LD DE,26064 | Point DE at table of display file addresses of starts of each pixel row | ||
| 38363 | LD H,0 | Load y-coordinate into HL... | ||
| 38365 | LD L,A | ... | ||
| 38366 | ADD HL,HL | Double it | ||
| 38367 | ADD HL,DE | And add as offset to table of display file addresses of starts of each pixel row | ||
| 38368 | PUSH HL | Transfer value into IX... | ||
| 38369 | POP IX | ... | ||
| 38371 | LD A,(23491) | Load y-coordinate of top of hand cursor (pixels) into A | ||
| 38374 | SUB C | Subtract y-coordinate of bottom of window | ||
| 38375 | NEG | Negate, so A now holds distance between top of hand cursor and bottom of window | ||
| 38377 | EX AF,AF' | Exchange A register | ||
| 38378 | LD A,(23490) | Load x-coordinate of left of interior of window (characters) into A | ||
| 38381 | LD C,A | Copy into BC... | ||
| 38382 | LD B,0 | ... | ||
| 38384 | EX AF,AF' | Switch A register (A now holds distance between top of hand cursor and bottom of window) | ||
| 38385 | EX AF,AF' | Switch A register (now holds x-coordinate of left of interior of window in characters on first pass) | ||
| 38386 | DEC IX | Move IX back by two bytes... | ||
| 38388 | DEC IX | ... | ||
| 38390 | LD L,(IX+0) | Load HL with display file address of start of pixel row 1... | ||
| 38393 | LD H,(IX+1) | ... | ||
| 38396 | LD E,(IX+2) | Load DE with display file address of start of pixel row 2... | ||
| 38399 | LD D,(IX+3) | ... | ||
| 38402 | ADD HL,BC | Add x-coordinate of left of interior of window to display file address | ||
| 38403 | EX DE,HL | Swap addresses | ||
| 38404 | ADD HL,BC | Add x-coordinate of left of interior of window to display file address | ||
| 38405 | EX DE,HL | Swap addresses back (HL points to upper row and DE points to lower row) | ||
| 38406 | LD A,(HL) | Read display file data from upper row... | ||
| 38407 | LD (DE),A | ...and copy into lower row | ||
| 38408 | INC DE | Increase DE and HL (as hand cursor is two characters wide)... | ||
| 38409 | INC HL | ... | ||
| 38410 | LD A,(HL) | Read display file data from upper row... | ||
| 38411 | LD (DE),A | ...and copy into lower row | ||
| 38412 | EX AF,AF' | Swap A register (A now holds remaining distance between top of hand cursor and bottom of window) | ||
| 38413 | DEC A | Decrease remaining distance in A | ||
| 38414 | JR NZ,38385 | Loop back to 38385 for next pixel row | ||
| 38416 | RET | Return | ||
| Prev: 38296 | Up: Map | Next: 38417 |