/LOGOFF.PA                      MULTOS-8                JAN 10,1979
/
/
/       THIS PROVIDES THE LOGOFF INFORMATION FOR MULTOS-8 TIME SHARING
/UPDATE 1               REMOVED THE NEED FOR EAE.....8-22-79
/
/       DEFINATIONS
/
        TOD=6114        /TIME OF DAY
        DATE=6115       /DATE
        TASK=6116       /RETURN THE TASK NO.
        IHLT=6117       /HALT THE USER TASK
/
/
        ACL=7701
        CAM=7621
/
        *20
TBUF,   0
/
/
        *200
        CLL CLA         /BE SURE THE AC AND LINK ARE CLEAR
        TAD (214
        JMS I (TERM
        CLA
        JMS I (PTXT     /OUTPUT THE FIRST TEXT
        TXT1            /TASK NO.
        CLL CLA
        TASK            /GET THE USER TASK NO.
        AND (7          /MASK TO BE SURE OF DIGIT
        TAD ("0         /CONVERT TO ASCII
        JMS I (TERM
        JMS I (PTXT
        TXT2            /LOGGED OFF AT
        JMS I (GTIME
        DECIMAL
        TAD (-10
        OCTAL
        DCA TEMP
BV,     TAD (212
        JMS I (TERM
        TAD (3
        JMS I (TERM
        CLL CLA
        ISZ TEMP
        JMP BV
/       IF WE ARE IN BATCH KILL IT
/
        CDF 0
        TAD I (7777     /IF BIT ZERO IS SET BATCH IS ACTIVE
        AND (1777       /MASK TO REMOVE BIT ZERO
        DCA I (7777     /REPLACE IT
/
/       NOW STOP THE VIRTUAL MACHINE
/
        IHLT            /HALT THE VIRTUAL MACHINE
        HLT
        HLT
        HLT
/
TEMP,   0
/
        PAGE
/TEXT UNPACKING AND OUTPUTTING ROUTINE.
/ASSUMES CALLING FIELD IS DATA FIELD AND THAT THE TEXT
/TO BE PRINTED IS IN THAT FIELD.
/SAVES CONTENTS OF THE AC. AND MQ.
/
PTXT,   0
        TAD I PTXT      /GET POINTER
        DCA COL
        ISZ PTXT        /ADVANCE RETURN POINTER
PXT,    TAD I COL       /GET 1 WORD
        BSW
        JMS PTST        /UNPACK,TEST,PRNT
        TAD I COL
        JMS PTST        /UNPACK,TEST,PRNT
        ISZ COL
        JMP PXT         /GET NXT PNT
STRA,   CLL CLA
        JMP I PTXT
/
PTST,   0               /UNPACK,TEST,PRNT
        AND (77         /NO. IN AC SO MASK IT
        MQL             /TEMP SAVE IT
        MQA             /GET IS AGAIN & TEST IT
        SNA             /WAS IT ZERO ??
        JMP STRA        /JMP OUT  FINISHED !!
        TAD (-43        /FOR A LINE FEED     '#' IMPLIES  L.F.
        SZA CLA
        JMP PTSA
        TAD (212        /DO THE LINE FEED FIRST
        JMS TERM        /OUTPUT IT
        TAD (215        /NOW MAKE IT A RETURN
        JMS TERM        /OUTPUT IT
        CLA
        JMP I PTST      /GET NXT CHARCTER
PTSA,   MQA
        AND (40         /WAS IT A NUMBER ?
        SNA CLA         /NON ZERO = NUMBER
        TAD (100        /CONVER TO ASCII
        TAD (200
        MQA             /PUT IN CHARCTER PART NOW
        JMS TERM        /OUTPUT IT
        JMP I PTST
/
COL,    0
/
/
TERM,   0
        TLS
        TSF
        JMP .-1
        CLL CLA
        JMP I TERM
/
        PAGE
GTIME,  0
        CLA CLL
        CLA CLL CML RAR
        TOD             /GET THE TIME OF DAY
        TBUF
        TAD TBUF
        CLL RAR
        DCA TBUF
        TAD TBUF+1
        RAR
        DCA TBUF+1
        JMS B           /SUBROUTINE CALL
        0053
        SZA
        JMS CA          /SUBROUTINE
        JMS DA
        JMS B
        0000
        5670
        JMS CA          /SUBROUTINE
        JMS DA
        JMS B
        0000
        0062
        JMS CA
        JMS A           /SUBROUTINE
        0015
        0012
        0000
        JMP I GTIME
/
B,        HLT
        CLA CLL IAC
        TAD B
        DCA TBUF+5
        TAD I TBUF+5
        CLL CMA IAC
        DCA TBUF+4
        CML RAL
        TAD I B
        CMA IAC
        DCA TBUF+3
        DCA TBUF+2
X,      CLA CLL
        TAD TBUF+4
        TAD TBUF+1
        DCA TBUF+1
        RAL
        TAD TBUF+3
        TAD TBUF
        DCA TBUF
        TAD TBUF
        CLA SPA
        JMP ZA
        ISZ TBUF+2
        JMP X
ZA,     CLA CLL
        TAD I TBUF+5
        TAD TBUF+1
        DCA TBUF+1
        RAL
        TAD I B
        TAD TBUF
        DCA TBUF
        ISZ TBUF+5
        TAD TBUF+2
        JMP I TBUF+5
/
A,      0               /SUBROUTINE
        TAD I A
        ISZ A
        SNA
        JMP I A
        JMS TYCHAR      /TYPE THE CHARCTER
        JMP A+1
/
TYCHAR, 0
        TLS
        CLA CLL
        JMP I TYCHAR
/
CA,     HLT
        DCA TBUF+7
        DCA TBUF+6
        TAD TBUF+7
T,      TAD (7766
        SPA
        JMP Y
        ISZ TBUF+6
        JMP T
Y,      TAD (12
        DCA TBUF+7
        TAD TBUF+6
        TAD (60
        JMS TYCHAR
        TAD TBUF+7
        TAD (60
        JMS TYCHAR
        JMP I CA
/
DA,     HLT
        TAD (72
        JMS TYCHAR
        JMP I DA
        HLT
        HLT
        HLT
        HLT
        HLT
        HLT
        HLT
        HLT
        HLT
        HLT
        HLT
/
        PAGE







/
        PAGE
TXT1,   TEXT *###JOB NO.  *
TXT2,   TEXT *##LOGGED OFF AT   *
