![]() |
Routines |
Prev: 25752 | Up: Map | Next: 25840 |
Used by the routine at 27291.
|
||||
HandlerTime | 25799 | LD A,(23672) | A=FRAMES. | |
25802 | CP 50 | Return if A < 50. | ||
25804 | RET C | |||
25805 | SUB 50 | A = A - 50. | ||
25807 | LD (23672),A | Write A back to FRAMES. | ||
Update the time from the smallest unit upwards.
Handles the "seconds".
|
||||
25810 | LD HL,24115 | HL=Time_3. | ||
25813 | LD A,(HL) | Grab the seconds. | ||
25814 | INC A | Increase seconds by one. | ||
25815 | DAA | Write seconds back to Time_3. | ||
25816 | LD (HL),A | |||
25817 | CP 96 | Return unless seconds have reached 96. | ||
25819 | RET NZ | |||
25820 | LD (HL),0 | Reset seconds to 0. | ||
Handles the "minutes".
|
||||
25822 | DEC HL | HL=Time_2. | ||
25823 | LD A,(HL) | Grab the minutes. | ||
25824 | INC A | Increase minutes by one. | ||
25825 | DAA | Write minutes back to Time_2. | ||
25826 | LD (HL),A | |||
25827 | CP 96 | Return unless minutes have reached 96. | ||
25829 | RET NZ | |||
25830 | LD (HL),0 | Reset minutes to 0. | ||
Handles the "hours".
|
||||
25832 | DEC HL | HL=Time_1. | ||
25833 | LD A,(HL) | Grab the hours. | ||
25834 | INC A | Increase hours by one. | ||
25835 | DAA | Keeping only bits 0-3, write hours back to Time_1. | ||
25836 | AND %00001111 | |||
25838 | LD (HL),A | |||
25839 | RET | Return. |
Prev: 25752 | Up: Map | Next: 25840 |