Skool Daze Routines
25374: Check whether signal has been raised
Used by the routines at 25303 and 32167. On entry, A holds the signal to be checked, which will be one of:
A Description Flags Bit
0 end of lesson/playtime 32712 0
8 time to start lesson in Map Room 32713 0
9 time to start lesson in Reading Room 32713 1
10 time to start lesson in Exam Room 32713 2
11 time to start lesson in White Room 32713 3
16 little boy no. 1 is ready 32714 0
17 little boy no. 1 is ready again 32714 1
26 EINSTEIN/BOY WANDER is ready 32715 2
27 MR WACKER is ready 32715 3
28 little boy has told ERIC about EINSTEIN/BOY WANDER/ANGELFACE 32715 4
29 EINSTEIN has grassed on ERIC/ERIC has mumps 32715 5
The routine returns with the zero flag reset if the signal has been raised.
A signal identifier (see above)
25374 PUSH AF Save the signal identifier briefly
25375 AND 248 Discard bits 0-2
25377 RRCA A=0, 1, 2 or 3
25378 RRCA
25379 RRCA
25380 ADD A,200 Modify the LD A,(m) instruction at 25396 below so m is 32712, 32713, 32714 or 32715
25382 LD (25397),A
25385 POP AF Restore the signal identifier to A
25386 AND 7 Modify the BIT n,A instruction at 25399 below
25388 ADD A,A
25389 ADD A,A
25390 ADD A,A
25391 ADD A,71
25393 LD (25400),A
25396 LD A,(m) Pick up the byte holding the flag for this signal
25399 BIT n,A Return with the zero flag reset if the signal has been raised
25401 RET