![]() |
Routines |
| Prev: D826 | Up: Map | Next: D865 |
|
Used by the routines at text_attr_addr and show_carried_slot.
HL is kept.
|
||||||||||||
| calc_attrib_addr | D848 | PUSH HL | ||||||||||
| D849 | LD A,H | H = (255 - y) / 8: the character row counted from the top, plus 8 | ||||||||||
| D84A | CPL | |||||||||||
| D84B | LD H,A | |||||||||||
| D84C | SRL H | |||||||||||
| D84E | SRL H | |||||||||||
| D850 | SRL H | |||||||||||
| D852 | SRL H | three more shifts across H and L: row * 32 + x / 8 | ||||||||||
| D854 | RR L | |||||||||||
| D856 | SRL H | |||||||||||
| D858 | RR L | |||||||||||
| D85A | SRL H | |||||||||||
| D85C | RR L | |||||||||||
| D85E | LD DE,$5700 | $5700 is the attribute file less those 8 rows | ||||||||||
| D861 | ADD HL,DE | |||||||||||
| D862 | EX DE,HL | |||||||||||
| D863 | POP HL | |||||||||||
| D864 | RET | |||||||||||
| Prev: D826 | Up: Map | Next: D865 |