Routines
| Prev: F1C1 | Up: Map | Next: F1F6 |
F1D6: Verb 136 (scripts only): is it hour n?
|
n counts 1-24. Succeeds only when the clock shows that hour: 13-24 are the pm hours, 1-12 the am ones.
Used by: internal verb 136 (IS HOUR: is the clock's hour (1-24) the direct object?).
|
||||||||||||
| F1D6 | DEFB $07,$00 | Action record header: flags $07; byte 1 $00 | ||||||||||
| F1D8 | LD A,($A034) | n | ||||||||||
| F1DB | LD B,$61 | 'a'... | ||||||||||
| F1DD | CP $0D | Compare A with $0D - ...unless n is 13 or more: | ||||||||||
| F1DF | JR C,$F1E5 | If A is below $0D, skip ahead to F1E5 | ||||||||||
| F1E1 | LD B,$70 | 'p' | ||||||||||
| F1E3 | SUB $0C | and 12 less | ||||||||||
| F1E5 | LD HL,$9FE0 | Point HL at the hour, 1-12 (9FE0) - Is that the hour? | ||||||||||
| F1E8 | CP (HL) | Compare A with the byte at the hour, 1-12 (9FE0) | ||||||||||
| F1E9 | JP NZ,$DC15 | No: refuse | ||||||||||
| F1EC | LD A,($9FE2) | Read 'a' or 'p' (9FE2) into A - And is it 'a' or 'p' as wanted? | ||||||||||
| F1EF | CP B | Compare A with B | ||||||||||
| F1F0 | JP NZ,$DC15 | No: refuse | ||||||||||
| F1F3 | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller - Yes: succeed | ||||||||||
| F1F5 | RET | Return to the caller | ||||||||||
| Prev: F1C1 | Up: Map | Next: F1F6 |