.enabl lc ;Enable lower case characters .title SYDATE - Do function of SET SY DATE under TSX-Plus 17-Feb-86 .ident /V01E01/ ;Version number ; 16-Jun-83 .ident /V01E04/ ;Version number of PTSX ; Program to do the function of SET SY DATE to SY:SY.SYS when running under ; TSX-Plus. ; ; BY: ; Jim Crapuchettes ; Omnex Corporation ; 2483 Old Middlefield Way, Suite 220 ; Mountain View, Calif. 94043 ; (415) 966-8400 .sbttl Definitions .mcall .fetch, .dstat, .releas .mcall .csispc,.lookup,.enter, .close, .purge .mcall .readw, .writw .mcall .print, .ttyin, .ttinr, .ttyout,.ttoutr .mcall .mfps, .mtps, .exit, .protect .mcall .trpset,.settop ; ASCII character definitions LF = 12 FF = 14 CR = 15 ; SYSCOM definitions USERPC = 40 USERSP = 42 JSW = 44 ;JSW bit definitons GTLIN$ = 10 EDIT$ = 20 SPXIT$ = 40 TCBIT$ = 100 HLTER = 200 CHAIN$ = 400 OVLY$ = 1000 VIRT$ = 2000 CHNIF$ = 4000 TTSPC$ = 10000 RSTRT$ = 20000 TTLC$ = 40000 USWAP$ = 100000 UFLOAT = 46 USERTOP = 50 ERRBYT = 52 USERRB = 53 ; Code bit definitions SUCCS$ = 1 WARN$ = 2 ERROR$ = 4 SEVER$ = 10 FATAL$ = 20 rmon = 54 ;Pointer to bottom of monitor SYSPTR = 54 ; System database offset definitions config = 300 ;Monitor configuration word confg2 = 370 ;Monitor configuration word 2 sysgen = 372 ;System Generation options word .sbttl Program proper start: .settop #newtop ;Get space (work area, etc...) cmp r0,#newtop ;Was enough space allocated? bhis ok2go ; Got the size, go do the work mov #noroom,r1 ; Not enough room! error: .print #herror ;Send program name and code and .print r1 ; message to user, bisb #ERROR$,@#USERRB ; set failure code .exit ; and exit... ok2go: .lookup #work,#1,#sysynm ;Open a channel to the file to patch mov #opener,r1 ; (Get address of error message) bcs error ; Can't find the file!!!! .readw #IOblok ;Read file into memory. mov #hrder,r1 ; (Get address of error message) bcs error ; Couldn't read the file. ; Find "DATE" entry in SET table of SY handler. ; ; The form of the SET table entry is as follows: ; ; Word 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0 ; Byte 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 ; | | | | | | ; +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ; 1,0 | Value to pass to SET code in R3 | ; +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ; 3,2 | First 3 characters of SET option name in RAD50 | ; +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ; 5,4 | Second 3 characters of SET option name in RAD50 | ; +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ; 7,6 | 100 = dec; 140= oct; 200 = NO |