Trailing-Edge
-
PDP-10 Archives
-
KS10_APT_INSTALL_TAPE
-
uetp/lib/cmlbsm.mac
There is 1 other file named cmlbsm.mac in the archive. Click here to see a list.
SUBTTL C.MITCHELL 1977. - UNIVERSAL FILE FOR SYMBOLS
UNIVERSAL CMLBSM
SEARCH MONSYM,MACSYM
SALL
;;ACCUMULATOR DEFINITIONS
F=0 ;FOR FLAGS ETC
T1=1 ;TEMP AC FOR JSYS
T2=2 ;TEMP AC FOR JSYS
T3=3 ;TEMP AC FOR JSYS
T4=4 ;TEMP AC FOR JSYS
T5=5 ;TEMP AC FOR JSYS
A=6 ;GENERAL AC
B=7 ;GENERAL AC
C=10 ;GENERAL AC
D=11 ;GENERAL AC
BUF=12 ;POINTER TO CURRENT BUFFER
PNT=13 ;SECOND POINTER TO BUFFER
INP=14 ;HOLDS JFN FOR INPUT
OUTP=15 ;HOLDS JFN FOR OUTPUT
P1=16 ;SPARE AC
P=17 ;PUSH DOWN POINTER
CMSYMV==1 ;VERSION NUMBER OF THIS FILE
PAGE
SUBTTL MACROS
;;MACRO TO DEFINE STORAGE
DEFINE LS (NM,SZ)
<NM: BLOCK SZ
>
;;MACRO TO SET UP COMMAND TABLES
DEFINE TB (DAT,TXT)<
XWD [ASCIZ /TXT/],DAT>
;;MACRO TO PRINT ERROR AND GOTO SPECIFIED LOCATION
DEFINE ERROR (ADDR,MSG)<
JRST [HRROI T1,[ASCIZ /
? MSG
/]
PSOUT
JRST ADDR]>
;;MACRO TO TYPE MESSAGE ON THE TERMINAL
DEFINE TELUSR (A)<
HRROI T1,[ASCIZ /[A]
/]
PSOUT>
;;MACRO TO SET UP BYTE POINTER TO A STRING
DEFINE TXTPTR (MSG) <POINT 7,[ASCIZ /MSG/]>
;;MACRO TO BUILD TABLE ENTRY WITH TWO STRINGS
DEFINE DMPNAM (A,B)<
[ASCIZ /A/],,[ASCIZ /B/]>
;;MACRO TO DEFINE JSYS STRING POINTER ENTRY
DEFINE STG (A)<
777777,,[ASCIZ #A#]>
PAGE
;;MACRO TO DEFINE PARAMETER BLOCK FOR A DIRECTORY
DEFINE TPB(A,B,C,D,E,F,G,H,J)<
EXP A ;USER TYPE
EXP B ;PERMANENT LIMIT
EXP C ;WORKING LIMIT
EXP D ;MODE WORD
EXP E ;PRIVILEDGES
EXP F ;DIRECTORY PROTECTION
EXP G ;FILE PROTECTION
EXP H ;GENERATION RETENTION COUNT
EXP J ;GROUP LIST>
;OFFSETS INTO BLOCK
TYPLNK==0
PERLIM==1
WORLIM==2
MODWRD==3
CAPABL==4
DRPROT==5
DFPROT==6
GENRET==7
GRPLST==10
;MACRO TO DEFINE CHARGES FOR A USER. EXTENSION OF ABOVE MACRO.
DEFINE CHB (A,B,C,D,E)<
EXP A ;NON-PEAK CONNECT/HR
EXP B ;NON-PEAK CPU TIME/HR
EXP C ;PEAK CONNECT/HR
EXP D ;PEAK CPU TIME/HR
EXP E ;DISK SPACE CHARGE>
;OFFSETS INTO BLOCK
CHGNCN==11
CHGNCP==12
CHGPCN==13
CHGPCP==14
CHGDSK==15
PAGE
SUBTTL MACROS FOR PRINTING LAYOUTS ETC
;MACRO TO DEFINE A STRING TO BE PRINTED DURING LAYOUT
;PRINTING.
DEFINE L(A) <LY%PNT,,[ASCIZ /A/]>
;MACRO TO DEFINE A STRING TO BE PRINTED SURROUNDED BY
;STARS DURING LAYOUT PRINTING.
DEFINE LS(A) <LY%PST,,[ASCIZ /A/]>
;MACRO TO DEFINE A STING TO BE CENTRE ALIGNED AND PRINTED
;BETWEEN STARS.
DEFINE CS(A) <LY%CST,,[ASCIZ /A/]>
;MACRO TO DEFINE A ROUTINE TO BE EXECUTED DURING LAYOUT
;PRINTING.
DEFINE RTN(A) <LY%RTN,,A>
;MACRO TO DEFINE A NEW HEADER
DEFINE HD(A) <LY%HDR,,[ASCIZ /A/]>
;SYMBOLS TO CONTROL LAYOUT PRINTING
LY%PNT==400000 ;JUST PRINT STRING
LY%PST==200000 ;RING STRING WITH STARS
LY%RTN==100000 ;EXECUTE ROUTINE
LY%HDR==40000 ;USE NEW HEADER
LY%CST==20000 ;CENTRE ALIGN AND RING WITH STARS
PAGE
SUBTTL ACCOUNTING SYMBOLS
;FACT FILE ENTRY DEFINITIONS
;OFFSETS INTO FACT FILE ENTRIES
.EFRUN==3 ;RUN TIME
.EFFIL==3 ;NUMBER OF FILE PAGES
.EFCON==4 ;CONSOLE TIME
.EFDEV==4 ;DEVICE DESIGNATOR
.EFQUA==5 ;SPOOLER OUTPUT
ENTMSZ==20 ;MAX SIZE OF ACCOUNTS ENTRY
;FIELD DEFINITIONS FOR STANDARD FIELDS
MSKSTR (ENTCOD,FCTENT+.EFHDR,EF%COD) ;ENTRY TYPE CODE
MSKSTR (ENTJOB,FCTENT+.EFHDR,EF%JOB) ;JOB NUMBER
MSKSTR (ENTLIN,FCTENT+.EFHDR,EF%LIN) ;LINE NUMBER
MSKSTR (ENTSIZ,FCTENT+.EFHDR,EF%SIZ) ;SIZE OF ENTRY
DEFSTR (ENTUSR,FCTENT+.EFUSR,35,36) ;DIRECTORY NUMBER
DEFSTR (ENTTAD,FCTENT+.EFTAD,35,36) ;TIME AND DATE
DEFSTR (ENTRUN,FCTENT+.EFRUN,35,36) ;RUN TIME
DEFSTR (ENTFIL,FCTENT+.EFFIL,35,36) ;NUMBER OF PAGES
DEFSTR (ENTCTM,FCTENT+.EFCON,35,36) ;CONSOLE TIME
DEFSTR (ENTDEV,FCTENT+.EFDEV,35,36) ;SPOOLER DEVICE
DEFSTR (ENTQUA,FCTENT+.EFQUA,35,36) ;SPOOLER PAGES ETC.
;INDEX IN FACT ENTRIES TO ACCOUNT TYPE WORD
.AWLGI==4 ;LOGIN
.AWCAC==4 ;CHANGE ACCOUNT
.AWDSK==4 ;DISK UTILISATION
.AWLPT==7 ;LPT
.AWCDR==7 ;CDR
JBMAX==MAXJOB ;MAX NUMBER OF JOBS
NSTR==2 ;MAXIMUM NUMBER OF PUBLIC FILE STRUCTURES
NOTE1==1 ;NOTES FOR ACCOUNTS OUTPUT
NOTE2==2
NOTE3==3
NOTE4==4
TIMTOP==^D24*^D60*^D60 ;I.E. 2400 HRS IN SECONDS
PKSTRT==^D8*^D60*^D60 ;I.E. 0800 HRS IN SECONDS
PKEND==^D18*^D60*^D60 ;I.E. 1800 IN MINUTES
TIMCNS==^D330 ;TIME CONSTANT FOR TIME CONVERSION
PAGE
;ACCOUNTING FUNCTIONS
AC%LOG==501 ;LOGIN
AC%CHA==502 ;CHANGE ACCOUNT
AC%LGO==141 ;LOGOUT
AC%ATT==142 ;ATTACH
AC%DET==143 ;DETACH
AC%CHK==201 ;CHECKPOINT
AC%RLD==740 ;RELOAD
AC%TMS==741 ;TIMESET
AC%DSU==540 ;START OF DISK UTILISATION STATISTICS
AC%DSE==601 ;DISK UTILISATION ENTRY
AC%LPT==401 ;LPT USAGE
AC%CDR==402 ;CDR USAGE
PAGE
SUBTTL SYMBOLS FOR "DLUSER" FORMAT FILE
;OFFSETS INTO IN-CORE DIRECTORY BLOCK WHEN PROCESSING
;A "DLUSER" FORMAT FILE.
PLOC==0 ;LINK TO NEXT BLOCK
DNAM==PLOC+1 ;POINTER TO NAME BLOCK
DPAS==DNAM+1 ;POINTER TO PASSWORD
DWOR==DPAS+1 ;WORKING LIMIT
DCAP==DWOR+1 ;CAPABILITIES
DMOD==DCAP+1 ;MODE WORD
DPER==DMOD+1 ;PERMANENT LIMIT
DNUM==DPER+1 ;DIRECTORY NUMBER
DPRT==DNUM+1 ;FILE PROTECTION
DDPT==DPRT+1 ;DIRECTORY PROTECTION
DRET==DDPT+1 ;GENERATION RETENTION COUNT
DLLG==DRET+1 ;LAST LOGIN
DUGP==DLLG+1 ;POINTER TO USER GROUP LIST
DDGP==DUGP+1 ;POINTER TO DIRECTORY GROUP
DNMB==DDGP+1 ;SPACE FOR NAME
DPSB==DNMB+11 ;SPACE FOR PASSWORD
DTYP==DPSB+11 ;DIRECTORY TYPE
DOWN==DTYP+1 ;OWNER
DNCN==DOWN+1 ;NON-PEAK CONNECT CHARGE
DNCP==DNCN+1 ;NON-PEAK CPU CHARGE
DPCN==DNCP+1 ;PEAK CONNECT CHARGE
DPCP==DPCN+1 ;PEAK CPU CHARGE
DDSK==DPCP+1 ;DISK USAGE CHARGE
DSPR==DDSK+1 ;SPARE LOCATIONS
DSPC==DSPR+10+NSTR ;NEXT FREE LOCATION
;FLAGS IN "DTYP"
TYP%US==1B0 ;DIRECTORY IS A USER DIRECTORY
TYP%NP==1B1 ;DO NOT PURGE THIS DIRECTORY
TYP%ND==1B2 ;DO NOT "DUMPER" THIS DIRECTORY
PAGE
SUBTTL DEFAULT VALUES FOR DEFAULT DIRECTORY PARAMETERS
;PERMANENT STOREAGE LIMITS
PMIN=^D250
PSML=^D500
PNOR=^D10000
PMAX=^D100000
;WORKING STOREAGE LIMITS
WMIN=^D250
WSML=^D500
WNOR=^D10000
WMAX=^D100000
;MODE WORDS
M0=0
M1=CD%DIR
;CAPABILITIES
PRVMIN==0
PRVLOW==0
PRVNOR==SC%CTC+SC%GTB+SC%SUP+SC%IPC+SC%ENQ
;DIRECTORY PROTECTIONS
DPRLIB=500000777740
DPRNOR=500000777700
DPRSEC=500000770000
;FILE PROTECTIONS
FPRLIB=500000777752
FPRNOR=500000777700
FPRSEC=500000770000
;GENERATION RETENTION COUNTS
GENSTD=500000000001
;CHARGES
INHPCN==2.50 ;IN-HOUSE CHARGE PRIME CONNECT/HR
INHNCN==1.25 ;IN-HOUSE CHARGE NON-PRIME CONNECT/HR
INHPCP==350.00 ;IN-HOUSE CHARGE PRIME CPU HOUR
INHNCP==175.00 ;IN-HOUSE CHARGE NON-PRIME CPU HOUR
INHDSK==0.25 ;IN-HOUSE CHARGE DSK PAGE/MONTH
OUTPCN==5.00 ;OUTSIDE CHARGE PRIME CONNECT/HR
OUTNCN==2.50 ;OUTSIDE CHARGE NON-PRIME CONNECT/HR
OUTPCP==700.00 ;OUTSIDE CHARGE PRIME CPU HOUR
OUTNCP==400.00 ;OUTSIDE CHARGE NON-PRIME CPU HOUR
OUTDSK==0.25 ;OUTSIDE CHARGE DSK PAGE/MONTH
PAGE
SUBTTL SYMBOLS FOR CIRCULATION LIST ENTRIES
NMLEN==10 ;SIZE OF NAME
FSTMAX==20 ;NUMBER OF FIRST NAMES ALLOWED
CLOC==0 ;LH POINTS TO PREVIOUS BLOCK
;RH POINTS TO NEXT BLOCK
CNAM==CLOC+1 ;SPACE FOR SURNAME
CFST==CNAM+NMLEN ;SPACE FOR FIRST NAME
CREG==CFST+NMLEN ;SPACE FOR REGION
CADR==CREG+1 ;SPACE FOR ADDRESS CODE
CCLS==CADR+1 ;SPACE FOR CLASSIFICATION
CINT==CCLS+1 ;SPACE FOR PROFILE WORD
CSPC==CINT+1 ;END OF BLOCK
;SYMBOLS FOR ADDRESS BLOCK DEFINITION
ALOC==0 ;SPACE FOR LOCATION
ACOD==ALOC+NMLEN ;SPACE FOR LOCATION CODE
AADR==ACOD+1 ;SPACE FOR ADDRESS
ASPC==AADR+^D40 ;FREE SPACE
PAGE
SUBTTL SYMBOLS FOR FILE LOOKUP ROUTINES
;THERE IS A SET OF FILE LOOKUP ROUTINES IN "CMLIB" WHICH ARE
;USED TO IDENTIFY THE TYPE OF FILE AS WELL AS THE EXISTENCE
;OF RELATED FILES. SYMBOLS FOR THESE ROUTINES ARE DEFINED HERE.
;"LOOKUP BLOCK" OFFSETS
..ZZ==0 ;START AT THE BEGINNING
DEFINE ..ZZZ(A)<
A==..ZZ
..ZZ==..ZZ+1>
..ZZZ F%%JFN;JFN FOR FILE HERE
..ZZZ F%%TYP;FLAGS FOR FILE TYPE STORED HERE
..ZZZ F%%EXI;FLAGS FOR RELATED FILES STORED HERE
..ZZZ F%%DFL;FLAGS DOR DIRECTORY
..ZZZ F%%DRF;DIRECTORY NUMBER
..ZZZ F%%TST;TEST ROUTINE FOR RELATED FILES STORED HERE
..ZZZ F%%STR;POINTER TO STRUCTURE
..ZZZ F%%DIR;POINTER TO DIRECTORY
..ZZZ F%%PTC;POINTER TO PROTECTION STRING
..ZZZ F%%ACC;POINTER TO ACCOUNT STRING
..ZZZ F%%HDR;START OF FDB
DEFINE ..ZZZ(A)<
F%%'A==F%%HDR+.FB'A ;.FB'A WORD OF FDB>
..ZZZ CTL
..ZZZ EXL
..ZZZ ADR
..ZZZ PRT
..ZZZ CRE
..ZZZ AUT
..ZZZ GEN
..ZZZ ACT
..ZZZ BYV
..ZZZ SIZ
..ZZZ CRV
..ZZZ WRT
..ZZZ REF
..ZZZ CNT
..ZZZ BK0
..ZZZ BK1
..ZZZ BK2
..ZZZ BK3
..ZZZ BK4
..ZZZ USW
..ZZZ GNL
..ZZZ NAM
..ZZZ EXT
..ZZZ LWR
..ZZZ LEN
PAGE
;FLAGS IN F%%TYP
DEFINE ..ZZZ(A)<
T%%'A==:..ZZ
..ZZ==..ZZ*2>
..ZZ==1
..ZZZ SAV;SAV FILE
..ZZZ EXE;EXE FILE
..ZZZ REL;REL FILE
..ZZZ UNV;UNV FILE
..ZZZ CRF;CRF FILE
..ZZZ LST;LST FILE
..ZZZ TXT;TXT FILE
..ZZZ DOC;DOC FILE
..ZZZ MEM;MEM FILE
..ZZZ HLP;HLP FILE
..ZZZ RNO;RNO FILE
..ZZZ RND;RND FILE
..ZZZ RNH;RNH FILE
..ZZZ DAT;DAT FILE
..ZZZ IDA;IDA FILE
..ZZZ IDX;IDX FILE
..ZZZ SRC;SOURCE FILE
..ZZZ CTL;CTL FILE
..ZZZ LOG;LOG FILE
..ZZZ CMD;CMD FILE
..ZZZ CCL;CCL FILE
..ZZZ TMP;TMP FILE
..ZZZ BAK;BACKUP FILE
..ZZZ WSP;WORKSPACE TYPE
..ZZZ SFK;KNOWN SYSTEM FILE
..ZZZ UNK;UNKNOWN FORMAT
PAGE
;FLAGS IN FF%%EXI
DEFINE ..ZZZ(A)<
E%%'A==..ZZ
..ZZ==..ZZ*2>
..ZZ==1
..ZZZ REL;REL FILE EXISTS
..ZZZ SRC;SOURCE FILE EXISTS
..ZZZ RND;RND EXISTS
..ZZZ RNH;RNH EXISTS
..ZZZ RNO;RNO EXISTS
..ZZZ IDA;IDA EXISTS
..ZZZ IDX;IDX EXISTS
..ZZZ CTL;CTL EXISTS
..ZZZ ODT;DAT FILE IS AN OUTPUT FILE
..ZZZ DEP;DEPENDENT FILE EXISTS
..ZZZ HGN;HIGHER GENERATION EXISTS
;FLAGS IN F%%DFL
D%%LGC==1 ;RIGHT HALF BIT 17. JOB LOGGED IN OR CONNECTED
PAGE
SUBTTL OUTPUT CONTROL FLAGS FOR FILESPEC
;THESE FLAGS ARE SUPPLIED IN T2 DURING A CALL TO
;ROUTINE "OTPFSP" AND RELATED ROUTINES IN "CMLIB".
;THEY CONTROL THE FIELDS TO BE OUTPUT WHEN PRINTING
;A FILESPEC.
S%%STR==400000000000
S%%DIR==200000000000
S%%NAM==100000000000
S%%EXT==40000000000
S%%GEN==20000000000
S%%PRO==10000000000
S%%ACC==4000000000
PAGE
SUBTTL SYMBOLS FOR STRUCTURES AND DIRECTORIES
DEFINE DEFDIR(A,B)<
A ;DEFAULT STRUCTURE
B ;DEFAULT DIRECTORY
BLOCK STRBUF ;WHERE TO PUT NEW STRUCTURE
BLOCK DIRBUF ;WHERE TO PUT NEW DIRECTORY
>
;OFFSETS IN ABOVE BLOCK
DE%STR==0
DE%DIR==DE%STR+1
DE%STS==DE%DIR+1
DE%DRS==DE%STS+STRBUF
STRBUF==10 ;SIZE OF BLOCK FOR STRUCTURE NAME
DIRBUF==20 ;SIZE OF BLOCK FOR DIRECTORY NAME
PAGE
SUBTTL GENERAL SYMBOLS
NPDL==50 ;SIZE OF PUSH DOWN STACK
DMXUSR==1000 ;DEFAULT MAX NUMBER OF USERS
ADRMAX==^D500 ;MAX NUMBER OF ADDRESSES
PEPMAX==^D500 ;MAX NUMBER OF PEOPLE
GRPSIZ==1000 ;SIZE OF GROUP BLOCK
HEPTOP==777500 ;TOP OF HEAP
PAGWID==^D64 ;WIDTH OF NEWSLETTER PAGE
PAGLEN==^D50 ;LENGTH OF PAGE FOR NEWSLETTER
MAXCOR==^D512*2 ;MAX NUMBER OF PAGES ON SYSTEM
MAXJOB==^D256 ;MAX NUMBER OF JOBS ON THE SYSTEM
FSTDIR==1 ;FIRST LEGAL DIRECTORY NUMBER
DIRMAX==777 ;HIGHEST LEGAL DIRECTORY NUMBER
DSWID==^D132 ;WIDTH OF LPT LINE
NCHPW==5 ;NUMBER OF CHARS PER WORD
ATMSIZ==150 ;LARGEST ATOM IN COMMAND SCAN
BUFSIZ==150 ;SIZE OF BUFFER FOR COMMAND SCANNER
SOFAR==0 ;FOR STATISTICS-OFFSET INTO DATA BLOCK FOR TOTAL
INCRMT==1 ;FOR STATISTICS-OFFSET INTO DATA BLOCK FOR INCR.
SUMM==2 ;FOR STATISTICS-OFFSET INTO DATA BLOCK FOR SUMMARY.
OPDEF PJRST [JRST] ;JUMP TO ROUTINE AND POPJ FROM THERE.
PAGE
END