Dynamite Dan | Routines |
Prev: EEBD | Up: Map | Next: EF1E |
|
||||||||
EEF1 | LD E,(HL) | Get the x co-ordinate. | ||||||
EEF2 | INC HL | Increment the pointer to the buffer. | ||||||
EEF3 | LD D,(HL) | Get the y co-ordinate. | ||||||
EEF4 | CALL $E8F1 | Convert this into a screen address in DE. | ||||||
EEF7 | INC D | Move down a row. | ||||||
EEF8 | INC HL | Increment the pointer to the buffer. | ||||||
The screen address is now in DE, so draw the string. This entry point is used by the routines at C92A and D378.
|
||||||||
EEF9 | LD A,(HL) | Get the next character. | ||||||
EEFA | CP $FF | Is it FF? | ||||||
EEFC | RET Z | If so, that's the end of the string, so return. | ||||||
EEFD | CP $FE | Is it FE? | ||||||
EEFF | JR Z,$EF1B | If so, it's the end of the line, so handle that. | ||||||
EF01 | PUSH HL | Store HL and DE. | ||||||
EF02 | PUSH DE | |||||||
EF03 | LD B,A | Multiply the character ID by 4. | ||||||
EF04 | ADD A,A | |||||||
EF05 | ADD A,B | |||||||
EF06 | LD L,A | Put this in HL. | ||||||
EF07 | LD H,$00 | |||||||
EF09 | ADD HL,HL | Double it to get an appropriate offset. | ||||||
EF0A | LD BC,$677F | Add the base offset for the character set. (677F) | ||||||
EF0D | ADD HL,BC | |||||||
EF0E | LD B,$06 | Draw 6 rows. | ||||||
EF10 | LD A,(HL) | Get the next graphic data. | ||||||
EF11 | LD (DE),A | Write it to screen. | ||||||
EF12 | INC HL | Move to the next position in the buffer. | ||||||
EF13 | INC D | Move to the next row. | ||||||
EF14 | DJNZ $EF10 | Loop while there are more rows. | ||||||
EF16 | POP DE | Restore HL and DE. | ||||||
EF17 | POP HL | |||||||
EF18 | INC E | Move forward a column. | ||||||
EF19 | JR $EEF8 | Loop back to print more. | ||||||
A newline character was found, so handle it.
|
||||||||
EF1B | INC HL | Move forward in the buffer. | ||||||
EF1C | JR $EEF1 | Jump back to get the next co-ordinates and line. |
Prev: EEBD | Up: Map | Next: EF1E |