![]() |
Routines |
| Prev: D800 | Up: Map | Next: D826 |
|
Used by the routines at print_text_single_colour, print_text, display_object, show_carried_slot, blit_2x8, wipe_rect and draw_sprite_rows.
The buffer is plain rows of 32 bytes, the bottom line first, so the address is y * 32 + x / 8 from its start: BC shifted right three times.
|
||||||||||||
| calc_vidbuf_addr | D811 | PUSH HL | BC / 8 = y * 32 + x / 8 | |||||||||
| D812 | SRL B | |||||||||||
| D814 | RR C | |||||||||||
| D816 | SRL B | |||||||||||
| D818 | RR C | |||||||||||
| D81A | SRL B | |||||||||||
| D81C | RR C | |||||||||||
| D81E | LD HL,screen_buffer | plus the start of the buffer | ||||||||||
| D821 | ADD HL,BC | |||||||||||
| D822 | LD C,L | |||||||||||
| D823 | LD B,H | |||||||||||
| D824 | POP HL | |||||||||||
| D825 | RET | |||||||||||
| Prev: D800 | Up: Map | Next: D826 |