| Dynamite Dan | Routines |
| Prev: ED00 | Up: Map | Next: EDA1 |
|
||||||||
| ED06 | LD A,(HL) | Get the width. | ||||||
| ED07 | CP $FF | Return if this is a terminator symbol instead. | ||||||
| ED09 | RET Z | |||||||
| ED0A | LD E,A | Get the height and put the sizes in DE. | ||||||
| ED0B | INC HL | |||||||
| ED0C | LD D,(HL) | |||||||
| ED0D | INC HL | Move to the next position and remember it. | ||||||
| ED0E | PUSH HL | |||||||
| ED0F | LD L,(HL) | Get the offset to the graphic buffer in HL. | ||||||
| ED10 | LD H,$00 | |||||||
| ED12 | ADD HL,HL | Double it to get an appropriate word offset. | ||||||
| ED13 | LD BC,$6C46 | Add the base offset address at 6C46. | ||||||
| ED16 | ADD HL,BC | |||||||
| ED17 | LD C,(HL) | Put the actual address of the graphic in BC. | ||||||
| ED18 | INC HL | |||||||
| ED19 | LD B,(HL) | |||||||
| ED1A | POP HL | Restore the graphic buffer position. | ||||||
| ED1B | INC HL | Move to the byte after it. | ||||||
| ED1C | LD A,(HL) | Get the next command. | ||||||
| ED1D | CP $FE | Jump forward if this is "draw right". | ||||||
| ED1F | JR Z,$ED36 | |||||||
| ED21 | CP $FD | Jump forward if this is "draw up". | ||||||
| ED23 | JR Z,$ED50 | |||||||
| ED25 | CP $FC | Jump forward if this is "draw right and down". | ||||||
| ED27 | JR Z,$ED6A | |||||||
| ED29 | CP $FB | Jump forward if this is "draw right and up". | ||||||
| ED2B | JR Z,$ED85 | |||||||
|
No special command here, so print the graphic.
|
||||||||
| ED2D | PUSH HL | Remember the current position. | ||||||
| ED2E | LD L,C | Put the graphic address in HL. | ||||||
| ED2F | LD H,B | |||||||
| ED30 | CALL $E84E | Print the graphic. | ||||||
| ED33 | POP HL | Restore HL and print another character. | ||||||
| ED34 | JR $ED06 | |||||||
|
Draw a string of UDGs to the right.
|
||||||||
| ED36 | INC HL | Move to the next position. | ||||||
| ED37 | PUSH HL | Remember HL and BC. | ||||||
| ED38 | PUSH BC | |||||||
| ED39 | LD C,(HL) | Put the increment amount in C. | ||||||
| ED3A | INC HL | Put the length in B. | ||||||
| ED3B | LD B,(HL) | |||||||
| ED3C | POP HL | Restore HL. | ||||||
| ED3D | PUSH BC | Remember the main registers used. | ||||||
| ED3E | PUSH DE | |||||||
| ED3F | PUSH HL | |||||||
| ED40 | CALL $E84E | Print the graphic. | ||||||
| ED43 | POP HL | Restore the registers. | ||||||
| ED44 | POP DE | |||||||
| ED45 | POP BC | |||||||
| ED46 | LD A,D | Move the X position right. | ||||||
| ED47 | ADD A,C | |||||||
| ED48 | LD D,A | |||||||
| ED49 | DJNZ $ED3D | Loop while there is more to draw. | ||||||
| ED4B | POP HL | Restore HL. | ||||||
| ED4C | INC HL | Move to the next UDG definition. | ||||||
| ED4D | INC HL | |||||||
| ED4E | JR $ED06 | |||||||
|
Draw a string of UDGs up.
|
||||||||
| ED50 | INC HL | Move to the next position. | ||||||
| ED51 | PUSH HL | Remember HL and BC. | ||||||
| ED52 | PUSH BC | |||||||
| ED53 | LD C,(HL) | Put the increment amount in C. | ||||||
| ED54 | INC HL | Put the length in B. | ||||||
| ED55 | LD B,(HL) | |||||||
| ED56 | POP HL | |||||||
| ED57 | PUSH BC | Remember the main registers used. | ||||||
| ED58 | PUSH DE | |||||||
| ED59 | PUSH HL | |||||||
| ED5A | CALL $E84E | Print the graphic. | ||||||
| ED5D | POP HL | Restore the registers. | ||||||
| ED5E | POP DE | |||||||
| ED5F | POP BC | |||||||
| ED60 | LD A,E | Move the Y position up. | ||||||
| ED61 | SUB C | |||||||
| ED62 | LD E,A | |||||||
| ED63 | DJNZ $ED57 | Loop while there is more to draw. | ||||||
| ED65 | POP HL | Restore HL. | ||||||
| ED66 | INC HL | Move to the next UDG definition. | ||||||
| ED67 | INC HL | |||||||
| ED68 | JR $ED06 | |||||||
|
Draw a string of UDGS right and down.
|
||||||||
| ED6A | INC HL | Move to the next position. | ||||||
| ED6B | PUSH HL | Remember HL and BC. | ||||||
| ED6C | PUSH BC | |||||||
| ED6D | LD C,(HL) | Put the increment amount in C. | ||||||
| ED6E | INC HL | |||||||
| ED6F | LD B,(HL) | Put the length in B. | ||||||
| ED70 | POP HL | |||||||
| ED71 | PUSH BC | Remember the main registers used. | ||||||
| ED72 | PUSH DE | |||||||
| ED73 | PUSH HL | |||||||
| ED74 | CALL $E84E | Print the graphic. | ||||||
| ED77 | POP HL | Restore the registers. | ||||||
| ED78 | POP DE | |||||||
| ED79 | POP BC | |||||||
| ED7A | LD A,D | Move the X position right. | ||||||
| ED7B | ADD A,C | |||||||
| ED7C | LD D,A | |||||||
| ED7D | INC E | Increase the Y position. | ||||||
| ED7E | DJNZ $ED71 | Loop while there is more to draw. | ||||||
| ED80 | POP HL | Restore HL. | ||||||
| ED81 | INC HL | Move to the next UDG definition. | ||||||
| ED82 | INC HL | |||||||
| ED83 | JR $ED06 | |||||||
|
Draw a string of UDGS right and up.
|
||||||||
| ED85 | INC HL | Move to the next position. | ||||||
| ED86 | PUSH HL | Remember HL and BC. | ||||||
| ED87 | PUSH BC | |||||||
| ED88 | LD C,(HL) | Put the increment amount in C. | ||||||
| ED89 | INC HL | Put the length in B. | ||||||
| ED8A | LD B,(HL) | |||||||
| ED8B | POP HL | Remember the main registers used. | ||||||
| ED8C | PUSH BC | |||||||
| ED8D | PUSH DE | |||||||
| ED8E | PUSH HL | |||||||
| ED8F | CALL $E84E | Print the graphic. | ||||||
| ED92 | POP HL | Restore the registers. | ||||||
| ED93 | POP DE | |||||||
| ED94 | POP BC | |||||||
| ED95 | LD A,D | Move the X position to the right. | ||||||
| ED96 | ADD A,C | |||||||
| ED97 | LD D,A | |||||||
| ED98 | DEC E | Decrease the Y position. | ||||||
| ED99 | DJNZ $ED8C | Loop while there is more to draw. | ||||||
| ED9B | POP HL | |||||||
| ED9C | INC HL | |||||||
| ED9D | INC HL | |||||||
| ED9E | JP $ED06 | |||||||
| Prev: ED00 | Up: Map | Next: EDA1 |