Prev: 36551 Up: Map Next: 36586
36569: Update virtual attribute cursor to attribute file for coordinates x=C, y=B
Used by the routines at 26673, 28683, 28747, 28841, 28882, 28960, 29032, 29089, 29184, 29205, 29225, 29291, 29960, 37571, 38242, 54853 and 54955.
Input
B y-coordinate (characters)
C y-coordinate (characters)
Output
HL Virtual attribute cursor attribute file address
36569 LD A,B Copy y-coordinate into A
36570 ADD A,A Multiply by 8...
36571 ADD A,A ...
36572 ADD A,A ...
36573 LD L,A Load HL with value...
36574 LD H,0 ...
36576 ADD HL,HL Multiply by four...
36577 ADD HL,HL ...now HL holds 32 times original y-coordinate
36578 LD D,88 Load DE with position of start of attribute data, plus x-coordinate...
36580 LD E,C ...
36581 ADD HL,DE Add 32 times y-coordinate
36582 LD (23487),HL Store this in memory (virtual attribute cursor storage)
36585 RET Return
Prev: 36551 Up: Map Next: 36586