*
*
*
 TITLE 'CP-V/CP-R BOUNDARY MODULE ELLA. 708009-51A00 4.5.74'
*
*
*
         PAGE
*
*  THE BOUNDARY ROM COMPRISES THE MODEL,DEVICE,TYPE AND TIME BOUNDARY
*  SELECTION MECHANISM.
*
         PAGE
         SYSTEM   SIG7FDP
*
         CSECT
*
*
         PAGE
*
*  DEFINITIONS.-----
*
         DEF      TYPE:0,DEV:0,MOD:0,TIME:0
*
*
*
         PAGE
*
*  REFERENCES.------
*
         REF      TYPEF,:TYPE:,DEVF,:DEV:,MODF,:MOD:
         REF      COMBUFF
         REF      E:PRINT,R:COM
         REF      DATE:0,YEAR:0,TIME:00
         REF      DATE:1,YEAR:1,TIME:1
         REF      DATE:2,YEAR:2,TIME:2
         REF      XFOX,XF9X
         REF      DECHEX:,EBCHEX1
         REF      COB,CAB,X4BD5
         REF      A:7
         REF      F:F
         REF      TIME:ZR,MD:JD,HMSN:MS
         REF      S:FLAG,GETDT
         REF      S:SYS
         REF      MDIO
         REF      RSE:
         REF      MODTBL:
*
*
*
*  DATA  AREA
*
B:FLAG   DATA     0          MOD,DEV OR TYPE FLAG   2,3,1 IN ORDER
B:VPM    DATA     0          MAXIMUM BYTE/ENTRY ALLOWED
B:XYZ    DATA     0
B:ZYX    DATA     0,0,0,0,0   TEMPORARY LOCATIONS.
B:PV     DATA     0           PARAMETER FOR NO. OF ENTRIES
B:IVC    DATA     0           PARAMETER FOR NO. OF BYTES/ENTRY.
*
*
*
         PAGE
B:START  EQU      %
*
*    TYPE ENTRY
*
TYPE:0   EQU      %
         STW,1    B:FLAG     SET B:FLAG. 1= TYPE
         LI,4     2          SET MAX ALLOWABLE BYTES/ENTRY.
         B        B:ENTRY    CONTINUE
*
*    MODEL ENTRY
*
MOD:0    EQU      %
         STW,2    B:FLAG     SET FLAG   2=MODEL
         B        B:DEVMOD    CONTINUE
*
*    DEVICE ENTRY
*
DEV:0    EQU      %
         STW,3    B:FLAG      SET FLAG  3=DEVICE
B:DEVMOD LI,4     4           SET MAX ALLOWABLE BYTE/ENTRY
*
*    CONTINUE
*
B:ENTRY  EQU      %
         STW,4    B:VPM       SAVE  REGISTER 4. (MAX.ALL.BYTE/ENTRY)
         LI,4     -8
         STW,0    B:XYZ+8,4  CLEAR  LOCATIONS.
         BIR,4    %-1
         LW,4     CAB         TRANSFER TO WORKING LOCATION
         STW,4    COB
*
*   BEGIN ANALYSIS OF VALUES.
*
B:B      EQU      %
         BAL,15   F:F          FETCH A BYTE (INPUT CHARACTER)
         B        B:D          TERMINATION.
         CB,14    X4BD5,1
         BE       B:C         BRANCH IF COMMA
         MTW,1    B:IVC       INCREMENT BYTE/ENTRY
         LW,4     B:IVC
         CW,4     B:VPM       WITHIN LIMITS.....
         BG       B:1ERR     BRANCH IF NOT (ERROR)
*
*  BEGIN PROCESSING ACCORDING TO APPROPIATE FORMAT. (DECIMAL/HEXADEC)
*
         LW,4     B:FLAG     FETCH FLDG
         CI,4     2
         BNE      B:1B       BRANCH IF NOT MODEL DEGIMITER
         CB,14    XFOX
         BL       B:3ERR     DETERMINE IF IT IS DECIMAL OR NOT
         CB,14    XF9X       BRANCH IF NOT A DECIMAL
         BLE      B:1B       *     *    *    *    *   *
         B        B:3ERR     *     *    *    *    *   *
B:1B     EQU      %
         BAL,15   EBCHEX1    CONVERT TO HEX.
         B        B:4ERR     BRANCH IF NOT A DECIMAL OR HEX NO.
         LW,4     B:PV       FETCH INDEX
         LW,14     B:ZYX,4       FETCH VALUE PARA ETER
         SLS,14   4
         OR,14    15         OR' THE 4 BITS INTO PLACE.
         STW,14   B:ZYX,4    STORE BACK.
         B        B:B
*
*   COMMA ENCOUNTERED
*
B:C      EQU      %
         MTW,1    B:PV       INCREMENT  ENTRIES COUNTER
         LW,4     B:PV
         CI,4     4          BRANCH ERROR IF TOO MANY ENTRIES.
         BG       B:2ERR     ERROR.... TOO MANY ENTRIES
         STW,0    B:IVC
         B        B:B        BRANCH BACK TO READ NEXT
*
*  TERMINATION.  EITHER NL OR  CR OR ALL BYTES (80)
*
B:D      EQU      %
         LI,4     -6
         LW,13    B:FLAG
B:4D     CI,13    1
         BE       B:1D        CLEAR:TYPE:,OR :MOD: OR :DEV:
         CI,13    2
         BE       B:2D         TOGETHER WITH    DEVF,MODF,OR TYPEF
         STW,0    DEVF+6,4
         B        B:3D
B:1D     STW,0    TYPEF+6,4
         B        B:3D
B:2D     STW,0    MODF+6,4
B:3D     BIR,4    B:4D
         STW,0    B:PV
         LI,4     -5           START TRANSFER OF VALUES
B:44D    LW,14    B:ZYX+5,4
         BEZ      B:5D          EITHER  :DEV:, :MOD:, :TYPE:
         LW,5     B:PV
         CI,13    1
         BE       B:11D
         CI,13    2
         BE       B:22D
         STW,14   :DEV:,5
         B        B:33D
B:11D    STW,14   :TYPE:,5
         B        B:33D
B:22D    LB,15   S:SYS     CHECK SYSTEM TYPE
         BNEZ     B:22E     B:  NOT EUAL ZERO
         BAL,15   DECHEX:
         B       B:3ERR
         XW,14    15
B:22E    STW,14    :MOD:,5     STORE MODEL NO
B:33D    MTW,1    B:PV        INCREMENT PARAMETER COUNT
B:5D     BIR,4    B:44D
         LW,5     B:PV        DEPOSIT NO. OF VALUES IN
         CI,13    1
         BE       B:111D       TO  MODF,DEVF OR TYPEF
         CI,13    2
         BE       B:222D
         STW,5    DEVF
         B        B:333D
B:111D   STW,5    TYPEF
         B        B:333D
B:222D   STW,5    MODF
B:333D   B        R:COM    BACK TO CONTROL
*
*
*
*
*
*    ERROR  " TOO MANY PARAMETERS/ENTRY."
*
B:1ERR   EQU      %
         LI,14    28           SET BYTE COUNT.
         LI,13    B1MSG        FETCH MSG ADDRESS.
         B        B:OUT
*
*    ERROR  " TOO MANY ENTRIES "
*
B:2ERR   EQU      %
         LI,14    23           SET BYTE COUNT
         LI,13    B2MSG        FETCH MSG
         B        B:OUT
*
*    ERROR  " CHARACTER ENTERED NOT DECIMAL "
*
B:3ERR   EQU      %
         LI,14    11           SET BYTE COUNT
         LI,13    B3MSG        FETCH MSG
         B        B:OUT
*
*    ERROR  'CHARACTER ENTERED NOT  A HEXADECIMAL NO.'
*
B:4ERR   EQU      %
         LI,14    15           SET BYTE COUNT
         LI,13    B4MSG        SET MSG
B:OUT    EQU      %
         STW,13   B:ERMSG      STORE TO OUTPUT LOCATION
         BAL,15   E:PRINT      ERROR PRINT
B:ERMSG  DATA     0
         B        R:COM        RETURN TO CONTROL
*
*
*
*        TEXT MESSAGES.
*
*
*
B1MSG    TEXT     'PARAMETER PER ENTRY EXCEEDED'
B2MSG    TEXT     'NO. OF ENTRIES EXCEEDED'
B3MSG    TEXT     'NOT DECIMAL'
B4MSG    TEXT     'NOT HEXADECIMAL'
*
*
*
*
*
         PAGE
*
*
*
*
*
*        TIME ROUTINE.
*
*
*
*
*        CONSTANTS.
*
T:DSCC   TEXT     '-:/,'
*
*
*        DATA     AREA
*
*
T:FF     DATA     0            FIELD FLAG. (SIGNALS 1 OR 2ND FILED)
T:IVC    DATA     0            INTERNAL VALUE COUNTER.
T:DC     DATA     0            DASH COUNT.
T:PST    DATA     0            PASS COUNT (SIGNIFICANT ONLY IF EXCEEDS 80)
T:SLSH   DATA     0            SLASH FLAG.
T:TEMP   DATA     0            TEMPORARY LOCATION
T:CF     DATA     0            COMMA FLAG.
*
*        SAVE LOCATIONS FOR THE TIME INPUT.
*
F1:HR    DATA     0
F2:HR    DATA     0
F1:MIN   DATA     0
F2:MIN   DATA     0
F1:MON   DATA     0
F2:MON   DATA     0
F1:DAY   DATA     0
F2:DAY   DATA     0
F1:YR    DATA     0
F2:YR    DATA     0
*
*        FLAGS TO DETERMINE WHETHER ANY INPUT HAS BEEN
*        MADE TO THE TIME AND DATE PARAMETERS.
*        0 IF NONE HAS BEEN MADE.
*        1 IF ANY ENTRY HAS BEEN MADE.
*        IN THIS CASES , ZERO IS A VALID ENTRY TO WARRANT A ONE.
*
FL:TIME  DATA     0,0
FL:DATE  DATA     0,0
*
*
*
         PAGE
*
*
*
*
*        TIME BOUNDARY.
*        THIS PART OF CODE WILL ACCEPT THE TIME AND DATE.
*        THE CONDITIONS FOR THE TIME COMMAND ARE AS SPECIFIED
*        IN THE SPECIFICATION 703118.
*        A BRANCH TO LABEL TIME:0 WILL ENTER THIS ROUTINE.
*
*
TIME:0   EQU      %
         LW,5     CAB          TRANSFER THE CAB TO COB.
         STW,5    COB
         LI,5     -7           SET INDEX TO CLEAR AREAS.
         STW,0    T:FF+7,5     CLEAR AREA 1
         BIR,5    %-1
*
         LI,5     -14
         STW,0    F1:HR+14,5   CLEAR AREA 2
         BIR,5    %-1
         STW,1    T:CF         SET COMMA FLAG.
*
*
*
1:TM     EQU      %
         BAL,15   F:F          FETCH CHARACTER FROM COMBUFF.
         B        7:TM         TERMINATION.
         MTW,1    T:PST        INCREMENT PASS FLAG.
         CB,14    T:DSCC,3     BRANCH IF COMMA
         BE       2:TM
         STW,0    T:CF         RESET COMMA FLAG.
         CB,14    XFOX         BRANCH IF DECIMAL NO.
         BL       11:TIM       BRANCH IF NOT.
         CB,14    XF9X
         BLE      3:TM
11:TIM   EQU      %
         CB,14    T:DSCC       BRANCH IF A DASH.
         BE       4:TM
*
*        T:IVC CHECKED HERE FOR THE BEFNEFIT OF COLON
*        SLASH ROUTINES. T:IVC MUST BE 1 OR 2 BEFORE ENTERING
*        THE COLON OR SLASH ROUTINES.
*
         MTW,0    T:IVC        CHECK T:IVC
         BEZ      12:TIM       BRANCH IF ERROR.
         STW,0    T:IVC        IVC OK. RESET NOW.
         CB,14    T:DSCC,1     BRANCH IF A COLON.
         BE       5:TM
         CB,14    T:DSCC,2     BRANCH IF A SLASH.
         BE       6:TM
12:TIM   EQU      %
         B        A:7          BRANCH TO PRINT 'INVALID ENTRY'
*
*
*
         PAGE
*
*        COMMA ENCOUNTERED.
*
*        DETERMINE IF ANY PREVIOUS ENTRIES MADE
*        IF NOT 'ERROR'
*
2:TM     EQU      %
         MTW,0    T:CF         BRANCH IF PREVIOUS COMMA SET.
         BNEZ     12:TIM
         MTW,0    T:IVC        CHECK IVC.
         BNEZ     12:TIM       BRANCH IF NOT ZERO
         STW,1    T:CF         SET COMMA FLAG.
         B        1:TM         READ NEXT CHARACTER.
*
*
*
         PAGE
*
*        INITIAL NUMBER ENTERED.
*        INCREMENT T:IVC
*        CONVERT AND STORE TO T:TEMP.
*
3:TM     EQU      %
         LW,15    T:IVC        BRANCH IF NOT EQUAL TO LESS THAN 2
         CI,15    2
         BGE      12:TIM       BRANCH .GTE. 2
         MTW,1    T:IVC        INCREMENT IVC.
         LI,15    0
         SLD,14   -4           PROCEED TO CONVERT AND STORE
         LW,14    T:TEMP
         SLD,14   4
         STW,14   T:TEMP
         B        1:TM         READ NEXT CHARACTER
*
*
*
         PAGE
*
*        DASH ENCOUNTERED.
*        INCREMENT DASH COUNTER.
*        IF T:DC  IS EQUAL TO 1 WHEN ENTERING (ERROR)
*
4:TM     EQU      %
         MTW,0    T:IVC        BRANCH IF IVC = GT. 1
         BNEZ     12:TIM
         LW,14    T:DC         BRANCH IF T:DC .NEQ. ZERO
         BNEZ     12:TIM
         MTW,1    T:DC         INCREMENT T:DC
         B        1:TM         READ NEXT CHARACTER.
*
*
*
         PAGE
*
*        COLON ENCOUNTERED.
*        T:IVC MUST BE 1 OR 2 (NOT ZERO)(IVC RESET BEFORE ENTERING)
*        T:DC MUST BE 0 OR 1
*
5:TM     EQU      %
         LW,14    T:TEMP       FETCH TEMPORARY LOCATION
         LW,4     T:DC         SET INDEX.
         LW,15    FL:TIME,4    CHECK FOR ENTRY PREVIOUSLY MADE.
         BNEZ     12:TIM       IF YES, **ERROR**
         STW,1    FL:TIME,4    SET THE FLAG.
         BAL,15   DECHEX:      CONVERT TO HEX.
         B        12:TIM       **ERROR**
         CI,15    23           COMPARE TO MAX HOURS PERMITTED.
         BG       12:TIM       BRANCH IF GREATER **ERROR**
         STW,15   F1:HR,4      STORE TO LOCATION.
51:TIM   EQU      %
         BAL,15   F:F          FETCH NEXT CHARACTER.
         B        53:TIM       TERMINATION.
         CB,14    XFOX         BRANCH IF DECIMAL NO.
         BL       52:TIM
         CB,14    XF9X         BRANCH IF NOT.
         BLE      54:TIM
52:TIM   EQU      %
         CB,14    T:DSCC,3     BRANCH IF COMMA
         BE       53:TIM
         CB,14    T:DSCC       BRANCH IF A DASH.
         BE       53:TIM
         B        12:TIM       **ERROR**
*
*
*
*
*        DASH OR COMMA ENCOUNTERED.
*        PROCEED TO EXIT.
*
53:TIM   EQU      %
         MTW,0    T:IVC        CHECK IVC.
         BEZ      12:TIM       **ERROR**
         STW,0    T:TEMP       RESET TEMPORARY
         STW,0    T:IVC        RESET IVC
         MTW,-1   COB          DECREMENT BY ONE COB.
         LW,4     T:DC         FETCH IEX.
         LW,14    F1:MIN,4     FETCH MINUTES.
         BAL,15   DECHEX:      CONVERT
         B        12:TIM       **ERROR**
         CI,15    59           COMPARE TO MAX MINUTES PERMITTED.
         BG       12:TIM       BRANCH IF GREATER**ERROR**
         STW,15   F1:MIN,4     STORE TO LOCATION.
         B        1:TM         READ NEXT CHARACTER.
*
*
*
*
*        NUMBER ENCOUNTERD.
*        FETCH AND SAVE THE MINUTES.
*
54:TIM   EQU      %
         LW,15    T:IVC        BRANCH IF IVC .GTW. 2
         CI,15    2
         BGE      12:TIM       **ERROR**
         MTW,1    T:IVC        I NCREMENT IVC.
         LW,4     T:DC         FETCH INDEX.
         LI,15    0
         SLD,14   -4           PROCEED TO CONVERT AND STORE.
         LW,14    F1:MIN,4
         SLD,14   4
         STW,14   F1:MIN,4
         B        51:TIM
         PAGE
*
*        SLASH ENCOUNTERED.
*        T:IVC MUST BE 1 OR 2
*        T:DC     MUST BE 0 OR 1
*
6:TM     EQU      %
         LW,14    T:TEMP       FETCH TEMPORARY.
         LW,4     T:DC         FETCH INDEX.
         LW,15    FL:DATE,4    CHECK TO SEE IF ENTRIES HAS BEEN MADE
         BNEZ     12:TIM       IF YES **ERROR**
         STW,1    FL:DATE,4    SET THE FLAG.
         BAL,15   DECHEX:      CONVERT TO HEX.
         B        12:TIM       **ERROR**
         CI,15    12           COMPARE TO MAX MONTHS PERMITTED.
         BG       12:TIM       BRANCH IF GREATER **ERROR**
         STW,15   F1:MON,4     STORE TO LOCATION.
         STW,0    T:SLSH       CLEAR OUT SLASH FLAG.
61:TIM   EQU      %
         BAL,15   F:F          FETCH CHARACTER.
         B        63:TIM       TERMINATION.
         CB,14    XFOX         BRANCH IF IT IS A DECIMAL.
         BL       62:TIM
         CB,14    XF9X
         BLE      64:TIM       BRANCH IF A DECIMAL.
62:TIM   EQU      %
         CB,14    T:DSCC,3     BRANCH IF A COMMA
         BE       63:TIM
         CB,14    T:DSCC,2     BRANCH IF SLASH
         BE       65:TIM
         CB,14    T:DSCC       BRANCH IF A DASH.
         BE       63:TIM
         B        12:TIM       **ERROR**
*
*
*
         PAGE
*
*        SLASH FOUND.
*        T:IVC    MUST BE 1 OR 2 NOT 0 OR 3
*        T:SLSH MUST BE 0
*
65:TIM   EQU      %
         MTW,0    T:IVC        CHECK FOR ZERO
         BEZ      12:TIM       **ERROR**
         MTW,0    T:SLSH       CHECK FOR ZERO
         BNEZ     12:TIM       **ERROR**
         MTW,1    T:SLSH       INCREMENT SLSH FLAG.
         STW,0    T:IVC        CLEAR IVC COUNTER.
         B        61:TIM       READ NEXT CHARACTER.
*
*
*
         PAGE
*
*        NUMBER FOUND.
*
64:TIM   EQU      %
         LW,15    T:IVC        FETCH IVC
         CI,15    2            BRANCH IF .GT. OR .EQ. 2
         BGE      12:TIM       **ERROR**
         MTW,1    T:IVC        INCREMENT INTERNAL VALUE COUNTER.
         LW,4     T:DC         FETCH DASH COUNTER.
         LI,15    0            CLEAR 15
         SLD,14   -4           PROCEED TO CONVERT AND STORE
         LW,14    T:SLSH
         BEZ      641:TIM
         LW,14    F1:YR,4
         B        642:TIM
641:TIM  EQU      %
         LW,14    F1:DAY,4
642:TIM  EQU      %
         SLD,14   4
         LW,15    T:SLSH
         BEZ      643:TIM
         STW,14   F1:YR,4
         B        644:TIM
643:TIM  EQU      %
         STW,14   F1:DAY,4
644:TIM  EQU      %
         B        61:TIM       GO FETCH NEXT CHARACTER.
*
*
*
         PAGE
*
*        COMMA OR DASH FOUND.
*
*        IVC MUST NOT BE ZERO
*        SLASH COUNTER MUST BE 1
*        EXIT WILL BE THRU THIS ROUTINE.
*
63:TIM   EQU      %
         MTW,0    T:IVC        CHECK FOR IVC = 0
         BEZ      12:TIM       **ERROR** BRANCH IF ZERO
         LW,4     T:SLSH       FETCH SLASH COUNTER.
         CI,4     1
         BNE      12:TIM       **ERROR** SLASH COUNTER .NE. 1
         MTW,-1   COB          DECREMENT COB INDEX.
         STW,0    T:IVC        CLEAR IVC.
         STW,0    T:TEMP       CLEAR TEMPORARY.
         LW,4     T:DC         FETCH INDEX.
         LW,14    F1:DAY,4     FETCH THE DAY ENTERED.
         BAL,15   DECHEX:      CONVERT TO HEX
         B        12:TIM       **ERROR**
         CI,15    31           COMPARE TO MAX DAYS PERMITTED.
         BG       12:TIM       BRANCH IF GREATER **ERROR**
         STW,15   F1:DAY,4     STORE TO LOCATION.
         LW,14    F1:YR,4      FETCH THE YEAR ENTERED.
         BAL,15   DECHEX:      CONVERT TO HEX.
         B        12:TIM       **ERROR**
         CI,15    99           COMPARE TO MAX YEARS PERMITTED.
         BG       12:TIM       BRANCH IF GREATER **EROR*
         STW,15   F1:YR,4      STORE TO LOCATION
         B        1:TM         BACK TO CENTRAL ROUTINE.
*
*
*
         PAGE
*
*        TERMINATE THE BYTE INPUT SEARCH.
*
7:TM     EQU      %
         LW,14    T:PST        FETCH PASS FLAG.
         BEZ      12:TIM       **ERROR**
*
*        VALID INPUT........
*        NOW, CHECK FOR DISCREPANCIES.
*
         LW,14    T:CF         CHECK THE COMMA FLAG
         BNEZ     12:TIM       **ERROR** COMMA FLAG MUST BE 0
         LW,14    T:IVC        CHECK IVC.
         BNEZ     12:TIM       **ERROR** IVC MUST BE ZERO
*
*        PROCEED HERE TO VALIDATE ENTRIES AND CHECK
*        FOR THE TIME BOUNDARIES .
*        THE LIMITS OF THE BOUNDARIES MUST NOT BE EXCEEDED.
*
*
*        CONTINUE PROCESS.
*
*
T:PROC   EQU      %
         LI,4     -2           INITIALIZE INDEX.
T2:PR    EQU      %
         LW,14    FL:DATE+2,4  CHECK DATE FLAG.
         BEZ      T1:PR        BRANCH IF NO ENTRY DONE.
         LW,13    F1:MON+2,4   ENTRY DONE. BEGIN CONVERSION
         LW,14    F1:DAY+2,4    FROM M/D TO JULIAN DAYS.
         BAL,15   MD:JD
         STW,15   F1:DAY+2,4   SAVE THE RESULTS.
T1:PR    EQU      %
         BIR,4    T2:PR        LOOP UNTIL DONE. WITH INDEX.
*
*
*
         LI,4     -2           INITIALIZE INDEX
T22:PR   EQU      %
         LW,14    FL:TIME+2,4  CHECK TIME FLAG.
         BEZ      T11:PR       BRANCH IF NO ENTRY DONE.
         LW,13    F1:HR+2,4    ENTRY DONE. BEGIN CONVERSION
         LW,14    F1:MIN+2,4    FROM HR/MIN TO MILLISEC.
         BAL,15   HMSN:MS
         B        12:TIM       **ERROR** NON-CONVERTIBLE.
         STW,15   F1:MIN+2,4   SAVE THE RESULTS.
T11:PR   EQU      %
         BIR,4    T22:PR       LOOP UNTIL DONE WITH INDEX.
*
*
*
*        FETCH THE DEFAULT OR APPROPIATE VALUES
*
*
         LI,4     -2           SET INDEX.
T3:PR    EQU      %
         LW,14    FL:DATE+2,4  CHECK DATE FLAG.
         BEZ      T4:PR        BRANCH IF NO ENTRY DONE.
         LW,14    FL:TIME+2,4  FETCH TIME FLAG.
         BNEZ     T6:PR        BRANCH IF ENTRY IS DONE!!
         LW,14    TIME:00,4    FETCH FROM TIME:ZR+2,4
         STW,14   F1:MIN+2,4   SAVE RESULTS.
         B        T6:PR        BRANCH  TO END.
T4:PR    EQU      %
         LW,14    FL:TIME+2,4  FETCH TIME FLAG.(NO DATE ENTERED)
         BEZ      T5:PR        BRANCH IF NO TIME ENTERD.
         BAL,15   GETDT        GET MOST CURRENT DAT-YEAR.
         LW,14    DATE:0            GET CURRENT DATE
         STW,14   F1:DAY+2,4   SAVE..
         LW,14    YEAR:0            GET CURRENT YEAR.
         STW,14   F1:YR+2,4    SAVE..
         B        T6:PR        BRANCH TOEND
T5:PR    EQU      %
         LW,14    DATE:1,4     FETCH FROM YEAR:1+2,4
         STW,14   F1:YR+2,4    SAVE..
         LW,14    TIME:1,4     FETCH FROM DATE:1+2,4
         STW,14   F1:DAY+2,4   SAVE..
         LW,14    YEAR:0,4     FETCH FROM TIME:1+2,4
         STW,14   F1:MIN+2,4   SAVE//
T6:PR    EQU      %
         BIR,4    T3:PR        LOOP UNTIL DONE.
*
*
*
*        BEGIN TO CHECK THE BOUNDS.
*
*
         LW,14    F1:YR        FETCH YEAR.
         CW,14    F2:YR
         BE       T7:PR        Y1 EQ. Y2 BRANCH:
         BL       T9:PR        Y1 .LT. Y2 BRANCH:
         LI,15    TY1GTY2      **ERROR** Y1 GT Y2
         B        T:ERPR
T7:PR    EQU      %
         LW,14    F1:DAY       FETCH DAY.
         CW,14    F2:DAY
         BE       T8:PR        D1 EQ D2 BRANCH:
         BL       T9:PR        D1 LT D2 BRANCH:
         LI,15    TD1GTD2      **ERROR** D1 GT D2
         B        T:ERPR
T8:PR    EQU      %
         LW,14    F1:MIN       FETCH TIME.
         CW,14    F2:MIN
         BG       T10:PR       **ERROR** T1 GT T2
T9:PR    EQU      %
         LW,14    F1:YR        (GOOD CONDITIONS):
         STW,14   YEAR:1       (1) Y1 LT Y2 , DATE-TIME PASSED.
         LW,14    F2:YR        (2) Y1 EQ Y2,,
         STW,14   YEAR:2           THEN D1 LT D2, TIME PASSED.
         LW,14    F1:MIN       (3) D1 EQ D2 THEN
         STW,14   TIME:1          T1 LT T2
         LW,14    F2:MIN
         STW,14   TIME:2
         LW,14    F1:DAY
         STW,14   DATE:1
         LW,14    F2:DAY
         STW,14   DATE:2
         BAL,15   RSE:         RESET
*
         B        R:COM        BRANCH TO EXEC.
*        ERROR**
*
T10:PR   EQU      %
         LI,15    TT1GTT2      FETCH TIME ERROR FORMAT.
T:ERPR   EQU      %
         LI,14    21           FETCH BYTE COUNT
         STW,15   T:ER1        STORE THE TEXT ADDRESS.
         BAL,15   E:PRINT
T:ER1    DATA     0
         B        A:7          BRANCH TO INVALID ENTRY.....
*
*
*
TY1GTY2  TEXT     'YEAR2 LESS THAN YEAR1'
TD1GTD2  TEXT     'DATE2 LESS THAN DATE1'
TT1GTT2  TEXT     'TIME2 LESS THAN TIME1'
*
*
*
         PAGE
         SPACE    25
         END      B:START

