Routines |
Prev: 55999 | Up: Map | Next: 56190 |
|
||||||||||||
Print_Numbers | 56110 | PUSH AF | Stash AF on the stack. | |||||||||
56111 | CALL Calculate_ScreenBlockAddress | Call Calculate_ScreenBlockAddress. | ||||||||||
56114 | POP AF | Restore AF from the stack. | ||||||||||
56115 | RRCA | RRCA. | ||||||||||
56116 | LD B,A | B=A. | ||||||||||
This entry point is used by the routines at Print_Score and Print_Level.
|
||||||||||||
Print_Numbers_0 | 56117 | LD A,(DE) | A=*DE. | |||||||||
56118 | LD C,A | C=A. | ||||||||||
56119 | AND %11110000 | Keep only bits 4-7. | ||||||||||
56121 | RRCA | RRCA. | ||||||||||
56122 | CALL Print_Numbers_1 | Call Print_Numbers_1. | ||||||||||
56125 | INC HL | Increment HL by one. | ||||||||||
56126 | LD A,C | A=C. | ||||||||||
56127 | AND %00001111 | Keep only bits 0-3. | ||||||||||
56129 | RLCA | RLCA. | ||||||||||
56130 | RLCA | |||||||||||
56131 | RLCA | |||||||||||
56132 | CALL Print_Numbers_1 | Call Print_Numbers_1. | ||||||||||
56135 | INC DE | Increment DE by one. | ||||||||||
56136 | INC HL | Increment HL by one. | ||||||||||
56137 | DJNZ Print_Numbers_0 | Decrease counter by one and loop back to Print_Numbers_0 until counter is zero. | ||||||||||
56139 | RET | Return. | ||||||||||
Print_Numbers_1 | 56140 | PUSH BC | Stash BC, DE and HL on the stack. | |||||||||
56141 | PUSH DE | |||||||||||
56142 | PUSH HL | |||||||||||
56143 | LD B,0 | B=0. | ||||||||||
56145 | LD C,A | C=A. | ||||||||||
56146 | PUSH HL | Stash HL on the stack. | ||||||||||
56147 | LD HL,62158 | HL=CustomFont. | ||||||||||
56150 | ADD HL,BC | HL+=BC. | ||||||||||
56151 | POP DE | Restore DE from the stack. | ||||||||||
56152 | LD B,8 | B=8. | ||||||||||
Print_Numbers_2 | 56154 | LD A,(HL) | A=*HL. | |||||||||
56155 | LD (DE),A | Write A to *DE. | ||||||||||
56156 | INC HL | Increment HL by one. | ||||||||||
56157 | LD IX,55354 | IX=Time. | ||||||||||
56161 | BIT 1,(IX+0) | Test bit 1 of *IX+0. | ||||||||||
56165 | JR Z,Print_Numbers_3 | Jump to Print_Numbers_3 if HL is zero. | ||||||||||
56167 | LD A,B | Jump to Print_Numbers_3 if B is not equal to 5. | ||||||||||
56168 | CP 5 | |||||||||||
56170 | JR NZ,Print_Numbers_3 | |||||||||||
56172 | PUSH HL | Stash HL on the stack. | ||||||||||
56173 | EX DE,HL | Exchange the DE and HL registers. | ||||||||||
56174 | LD DE,1760 | HL-=1760. | ||||||||||
56177 | SBC HL,DE | |||||||||||
56179 | EX DE,HL | Exchange the DE and HL registers. | ||||||||||
56180 | POP HL | Restore HL from the stack. | ||||||||||
56181 | JR Print_Numbers_4 | Jump to Print_Numbers_4. | ||||||||||
Print_Numbers_3 | 56183 | INC D | Increment D by one. | |||||||||
Print_Numbers_4 | 56184 | DJNZ Print_Numbers_2 | Decrease counter by one and loop back to Print_Numbers_2 until counter is zero. | |||||||||
56186 | POP HL | Restore HL, DE and BC from the stack. | ||||||||||
56187 | POP DE | |||||||||||
56188 | POP BC | |||||||||||
56189 | RET | Return. |
Prev: 55999 | Up: Map | Next: 56190 |