Routines |
Prev: 92FF | Up: Map | Next: 9368 |
|
||||
Buffer for processing text output.
|
||||
Time_Buffer | 932C | DEFM " 30",$00 | Guessing at the length. | |
9332 | DEFS $04 | Maybe unused? | ||
This entry point is used by the routine at Print_Time.
|
||||
Process_Print_Time | 9336 | PUSH DE | Push DE containing the screen position for printing onto the stack for later. | |
9337 | LD IX,$932C | Point IX at the first character of the time display buffer at Time_Buffer. | ||
933B | CALL Process_Time | Call Process_Time. | ||
933E | PUSH IX | IX points to one byte off the end of the time buffer, write 00 as a terminator for the print routine. | ||
9340 | POP HL | |||
9341 | LD A,$00 | |||
9343 | LD (HL),A | |||
9344 | POP HL | Fetch the screen position off the stack and store it in HL. | ||
The time isn't printed as "00005" so this routine replaces the zeroes with spaces in the time print buffer.
|
||||
9345 | LD DE,$932C | Store Time_Buffer in DE. | ||
Time_Zero_To_Spaces | 9348 | LD A,(DE) | Grab the next character from the time buffer. | |
9349 | CP $30 | If it is not ASCII "0" then jump to Time_Check_Last. | ||
934B | JP NZ,Time_Check_Last | |||
934E | LD A,$20 | Write ASCII "space" (20) to the time buffer location. | ||
9350 | LD (DE),A | |||
9351 | INC DE | Move onto the next character. | ||
9352 | JP Time_Zero_To_Spaces | Jump back to Time_Zero_To_Spaces. | ||
If time has run out, show at least an ASCII "0".
|
||||
Time_Check_Last | 9355 | LD DE,$9330 | Point to the last digit of the time buffer 9330. | |
9358 | LD A,(DE) | If it is not an ASCII "space" (20) then jump to Print_Time_Screen. | ||
9359 | CP $20 | |||
935B | JP NZ,Print_Time_Screen | |||
935E | LD A,$30 | Time has run out, so write ASCII "0" to this last character. | ||
9360 | LD (DE),A | |||
Send the time buffer to Print_String.
|
||||
Print_Time_Screen | 9361 | LD DE,$932C | Point to Time_Buffer and call Print_String. | |
9364 | CALL Print_String | |||
9367 | RET | Return. |
Prev: 92FF | Up: Map | Next: 9368 |