         SYSTEM   SIG7FDP
         TITLE    'C:CHKPT - OBJECT PROGRAM CHECKPOINT SUBROUTINE'
*
*    THE C:INT ENTRY POINT IS THE CONSOLE INTERRUPT LOCATION
*
         REF      M:CK              CHECKPOINT DCB
         REF      M:LL
         DEF      C:INT
C:INT    RES      0
         BAL,11   C:CKP             TAKE A CHECKPOINT
         CAL1,9   5                 M:TRTN  -  RESUME NORMAL EXECUTION
*
*    THE C:TIM  ENTRY POINT IS THE INTERVAL TIMER INTERRUPT LOCATION
         DEF      C:TIM,C:MIN
C:TIM    RES      0
         BAL,11   C:CKP             TAKE A CHECKPOINT
         CAL1,8   C:MIN-1           M:STIMER  -  SET THE TIMER AGAIN
         CAL1,9   5                 M:TRTN  -  RESUME NORMAL EXECUTION
*    FPT FOR M:STIMER CALL
         GEN,8,5,2,17    X'11',0,U,C:TIM
C:MIN    DATA     0
*
U        EQU      1                 MINUTES
*
*    THE C:CKP   SUBROUTINE TAKES A CHECKPOINT AND RECORDS ITS ID
*        ON THE LISTING LOG
         DEF      C:CKP
C:CKP    RES      0
         STW,11   CPLIST            RESTART ADDRESS
         DL,1     D1                INCREMENT
         DA,2     CNO                CHKPT
         DST,2    CNO                 ID NO.
         LI,3     1
         UNPK,2   MESS+2,3          INSERT CHKPT ID INTO M:PRINT MESSAGE
         UNPK,2   CPLIST+1,3        INSERT CHKPT ID INTO M:CHKPT FPT
         LI,3     X'F0'
         STS,3    MESS+2
         STS,3    CPLIST+1
         CAL1,4   CPLIST            M:CHKPT
         CAL1,2   PPLIST            M:PRINT
         B        *11               RETURN
CPLIST   DATA     0                 CODE, RESTART ADDRESS
         TEXTC    '000'             CHKPT ID
PPLIST   GEN,8,24 X'01',0           CODE, 0
         DATA     X'80000000'       P-BIT
         DATA     MESS
MESS     GEN,8,24 11,'CHK'
         TEXT     'PT  '
         TEXT     ' 000'
CNO      DATA,2   D'0'
         BOUND    4
D1       DATA,1   D'1'
         END
