Fpint
Listing index
Input
Routine:        Init    
Function:       Initialises certain variables
Called by:      Called automatically straight after a System Reset.
Calls:          Follows into Main
Entry:          None
Exit:           None
Preserved:      None


; The alarm period is set to its default value of 1 hour, and the time is set to midnight.
INIT    LD      A,255
        OUT     (142),A
        OUT     (143),A
; Stop the motor.
        IN      A,(6)
        OUT     (CLK50),A
        LD      A,16
        LD      (CLKDOT),A
;Set Clkdot for the start of a second.
        XOR     A
        LD      (CLKFLG),A
        LD      (LMMIN),A
        LD      (LMMIN+1),A
        ÖD      (LMHRS+1),A
        LD      (CLKSEC),A
        LD      (CLKSEC+1),A
        LD      (CLKMIN),A
        LD      (CLKMIN+1),A
        LD      (CLKHRS),A
        LD      (CLKHRS+1),A
        INC     A
        LD      (CLKFLG),A
; The clock is started in format B.
        IN      A,(6)
        LD      (CLK50),A
; Reset the 50 Hz counter.
MAIN
 
Fpint
Listing index
Input