| Routines

F000: Perform various main loop tasks

Called from the main loop at F02B. Closes any doors that need closing, decrements and checks the blown fuse delay counters, updates the on-screen message if necessary, and increments the score and decrements Sam's cash supply at regular intervals.
F000 | LD HL,$7FA9 | The main loop task timer is at 7FA9
F003 | DEC (HL) | Decrement it
F004 | LD A,(HL) | Pick up the new value
F005 | AND $07 | Is the value 0 mod 8?
F007 | JP Z,$F144 | If so, close any doors that need closing
F00A | CP $04 | Is the value 4 mod 8?
F00C | JP Z,$F404 | If so, decrement and check the blown fuse delay counters
F00F | CP $02 | Is the value 2 mod 8?
F011 | JP Z,$6EF4 | If so, update the on-screen message if necessary
F014 | CP $06 | Is the value 6 mod 8?
F016 | JP Z,$7AB6 | If so, increment the score and decrement Sam's cash supply at regular intervals
F019 | RET |