Prev: 63040 Up: Map Next: 63162
63134: Load HL with display file address for coordinates in BC
Used by the routine at 63040.
Input
B y-coordinate of axe in pixels
C x-coordinate of axe in pixels
Output
A Horizontal pixel offset of axe
HL Display file address for axe
63134 LD A,C Load A with remainder, when dividing x-coordinate (pixels) by eight...
63135 AND 7 ...i.e. "pixel-within-byte" address
63137 EX AF,AF' Switch AF and AF'
63138 LD H,0 Load HL with double y-coordinate in pixels...
63140 LD L,B ...
63141 ADD HL,HL ...
63142 LD DE,65140 Point DE at table of display file addresses of start of each pixel row...
63145 ADD HL,DE ...and add HL as offset in HL
63146 LD A,(HL) Load HL with display file address of start of pixel row at y-coordinate...
63147 INC HL ...
63148 LD H,(HL) ...
63149 LD L,A ...
63150 LD A,C Load A with x-coordinate in pixels...
63151 RRCA ...and divide by eight to give x-coordinate in characters...
63152 RRCA ...
63153 RRCA ...
63154 AND 31 ...
63156 LD C,A Load BC with x-coordinate in characters...
63157 LD B,0 ...
63159 ADD HL,BC ...and add to HL as offset in HL
63160 EX AF,AF' Switch AF and AF' (A now contains "pixel-within-byte" address)
63161 RET Return
Prev: 63040 Up: Map Next: 63162