Trailing-Edge
-
PDP-10 Archives
-
ALGOL-10_V10B_BIN_SRC_1err
-
algsys.mac
There are 8 other files named algsys.mac in the archive. Click here to see a list.
;
;
;COPYRIGHT (C) 1975,1981,1982 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
;TRANSFERRED.
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
;AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
;
;
;
; THIS FILE MUST BE COMPILED AFTER ALGPRM, AND BEFORE ALGLIB
SEARCH ALGPRM ; SEARCH MAIN PARAMETER FILE
SALL
%UNIVERSAL(ALGSYS,ALGOL LIBRARY PARAMETER FILE)
SUBTTL LIBRARY MACROS
; %ENTER - GENERATES ENTRY %NNNA OR %NNNI (%NNNK) AS MANY TIMES AS NEEDED
DEFINE %ENTER(ALIAS),<
IRP ALIAS <
IFE PROC-KA10,
<ENTRY %'ALIAS'A
>
IFN PROC-KA10,
<ENTRY %'ALIAS'I
%'ALIAS'L=%'ALIAS'I ;[205]
ENTRY %'ALIAS'L ;[205]
>>>
; LIBENT - GENERATES POST-MORTEM BLOCK, POINTER TO IT & PARAM CALL
; FOR LIBRARY ROUTINES THAT LOOK LIKE GENUINE ALGOL PROCEDURES
;
; CALL - LIBENT(ALIAS-#,NAME,V)
;
; WHERE: ALIAS-# IS THE 1-,2- OR 3-DIGIT ALIAS NUMBER
; (WHICH AGREES WITH THE LIB MACRO IN ALGCON)
; FROM WHICH THE PROCEDURE'S ENTRY-POINT NAME IS FORMED,
; VIZ: %NNNA FOR KA10 OBJECT OR %NNNI FOR KI10 OR
; OR %NNNK FOR KL10.
;
; NAME IS THE SIXBIT NAME OF THE PROCEDURE:
; THIS IS DUMPED INTO THE POST-MORTEM BLOCK
; FOR THE RUN-TIME TRACE PACKAGE TO TYPE OUT.
;
; V IS OPTIONAL. IF PRESENT, THE PROCEDURE HAS A
; VARIABLE NUMBER OF PARAMETERS (SEE, FOR EXAMPLE, IMAX)
; AND V WILL BE THE OFFSET ON THE LOCAL STACK WHERE PARAM
; WILL STORE THE NUMBER OF ACTUALS.
;
; THE MACRO GENERATES EVERYTHING THAT IS NEEDED FOR PROCEDURE ENTRY,
; EXCEPT FOR THE SEARCH ALGPRM,ALGSYS WHICH MUST PRECEDE IT.
; THE JSP AX,PARAM OR PAR0 IS GENERATED, AND THE P.M. BLOCK
; POINTER, BUT NOT THE DESCRIPTOR-WORDS THAT FOLLOW. ENTRY
; STATEMENTS ARE GENERATED, AND THE NAME IS PUT INTO THE CREF FOR
; EASE OF FINDING THE PROCEDURE IN A LARGE LIBRARY-LISTING.
DEFINE LIBENT(ALIAS,NAME,V,%X) <
IFE PROC-KA10,<
ENTRY %'ALIAS'A
>
IFN PROC-KA10,<
ENTRY %'ALIAS'I
%'ALIAS'L=%'ALIAS'I ;[205]
ENTRY %'ALIAS'L ;[205]
>
IFNDEF %ALGDR,<
EXTERNAL %ALGDR
SALL
%SUBTTL(ALGLIB,ALGOL LIBRARY)
>
%X: Z ;; PROFILE WORD
ZZZ==1 ;; ALLOW 1 FOR THE *
IRPC NAME,<ZZZ==ZZZ+1>;; COUNT BYTES
XWD <ZZZ/6+1>,ZZZ ;; WORDS,,BYTES
SIXBIT\NAME'*\
IFE <<ZZZ/6>*6-ZZZ>,<
Z ;; SIXBITZ WORD !
>
IFNB <V>, <
XWD DL,V ;; VARIABLE # PARAMS
NAME: ;; FOR CREF
LABEL(ALIAS): JSP AX,PAR0>
IFB <V>, <
NAME: ;; FOR CREF
LABEL(ALIAS): JSP AX,PARAM>
EXP %X ;; POINTER TO PMB BLOCK
PURGE NAME ;; JUST IN CASE
>
; STDENT - DOES THE SAME THINGS AS LIBENT, FOR
; STANDARD FUNCTIONS (LIKE SIN) WHICH DON'T CALL
; PARAM. IT MAKES A P.M. BLOCK, AND PLANTS A CALL
; TO THE OTS ROUTINE TRSTD WHICH DOES TRACING
; IF REQUIRED.
;
; CALL - STDENT(ALIAS-#,NAME)
;
; WHERE THE PARAMETERS ARE AS FOR LIBENT
DEFINE STDENT(ALIAS,NAME,%X) <
IFE PROC-KA10,<
ENTRY %'ALIAS'A
>
IFN PROC-KA10,<
ENTRY %'ALIAS'I
%'ALIAS'L=%'ALIAS'I ;[205]
ENTRY %'ALIAS'L ;[205]
>
IFNDEF %ALGDR,<
EXTERNAL %ALGDR
SALL
%SUBTTL(ALGLIB,ALGOL LIBRARY)
>
%X: Z ;; PROFILE WORD
ZZZ==1
IRPC NAME,<ZZZ==ZZZ+1>;; COUNT CHARS IN NAME.
XWD <ZZZ/6+1>,ZZZ ;; WORDS,,CHARS
SIXBIT\NAME'*\
IFE <<ZZZ/6>*6-ZZZ>,<
Z ;; SIXBITZ WORD !
>
NAME: ;; FOR CREF
LABEL(ALIAS): ;; ENTRY
PUSHJ SP,TRSTD
EXP %X
PURGE NAME
>
; LABEL MACRO - GENERATES %NNNA OR %NNNI FOR KA OR KI
IFE PROC-KA10,<
DEFINE LABEL(M),<%'M'A>>
IFN PROC-KA10,<
DEFINE LABEL(M),<%'M'I>>
; EXTLAB MACRO - GENERATES EXTERN %NNNA OR %NNNI AS MANY TIMES
; AS NEEDED
DEFINE EXTLAB(M),<
IRP M <
IFE PROC-KA10,
<EXTERN %'M'A
>
IFN PROC-KA10,
<EXTERN %'M'I
EXTERN %'M'L ;[205]
>>>
SUBTTL LONG REAL ARITHMETIC MACROS
DEFINE DOP(X,N,B)
<
DEFINE X'N(Z)
<
IFE PROC-KA10,
<
IFNDEF %'B'A,
<
EXTERNAL %'B'A
>
MOVEI AX,Z
PUSHJ SP,LABEL(B)
>
IFE PROC-KI10,
<
IFIDN <N> <0>,
<
X A0,Z
>
IFIDN <N> <2>,
<
X A2,Z
>
IFIDN <N> <3>,
<
X A3,Z
>
IFIDN <N> <4>,
<
X A4,Z
>
IFIDN <N> <6>,
<
X A6,Z
>
IFIDN <N> <9>,
<
X A11,Z
>
>
>
>
DOP DFAD,0,17
DOP DFSB,0,20
DOP DFMP,0,21
DOP DFDV,0,22
DOP DFMP,2,50 ; [240]
DOP DFAD,3,25
DOP DFSB,3,26
DOP DFMP,3,27
DOP DFDV,3,30
DOP DFAD,4,51 ; [240]
DOP DFSB,4,53 ; [240]
DOP DFMP,4,52 ; [240]
DOP DFAD,6,33
DOP DFSB,6,34
DOP DFMP,6,35
DOP DFDV,6,36
DOP DFAD,9,41
DOP DFSB,9,42
DOP DFMP,9,43
DOP DFDV,9,44
SUBTTL LONG REAL CONSTANT MACRO
;
; THIS MACRO WAS LIFTED STRAIGHT FROM FORTRAN
; TO ALLOW THE CONDITIONAL ASSEMBLY OF LONG
; REAL CONSTANTS IN EITHER KI OR KA FORMAT
;
;
IFE PROC-KI10, <
DEFINE DOUBLE(A,B) <
A
B>
>
IFE PROC-KA10, <
DEFINE DOUBLE (A,B)<
ZZ1.==A&<777000,,0>
IFL ZZ1.,<ZZ1.==-ZZ1.-<1000,,0>>
ZZ1.==ZZ1.-<033000,,0>
IFE B,<ZZ1.==0>
ZZ2.==ZZ1.+<<B+200>_-8>&<000777,,777777>
IFL ZZ1.,<ZZ2.==0>
A
ZZ2.
SUPPRESS ZZ1.,ZZ2.>
>
SUBTTL ALGOTS ROUTINE ADDRESS MACROS
DEFINE R(A,B)
<DEFINE B
<%ALGDR+A>> ; [234] REMOVE "@"
DEFINE PORTAL(A) ; [234] CHANGE "JRST" TO "PORTAL"
<Q=Q+1
R \Q,A>
; WHEN THIS IS CHANGED, DEFINITIONS AT OR ABOUT LINE 974 OF
; ALGMAC MAY HAVE TO BE CHANGED ALSO.
DEFINE ALGDIR <
Q=-1
PORTAL INITIA ; [234] 0- INITIALIZATION
PORTAL PARAM ; [234] 1- PROCEDURE PARAMETER ORGANIZATION
PORTAL PAR0 ; [234] 2- DITTO, VARIABLE LENGTH
PORTAL GOLAB ; [234] 3- GOTO LABEL
PORTAL ARRAY ; [234] 4- ARRAY LAYOUT
PORTAL OARRAY ; [234] 5- OWN ARRAY LAYOUT
PORTAL CHKARR ; [234] 6- CHECK ARRAY SUBSCRIPTS
PORTAL COMPAR ; [234] 7- COMPARE STRINGS
PORTAL PBYTE ; [234] 10-BYTE POINTER
PORTAL BLKBEG ; [234] 11-BLOCK BEGIN
PORTAL BLKEND ; [234] 12-BLOCK END
PORTAL CPYSTR ; [234] 13-COPY STRING
PORTAL CPYARR ; [234] 14-COPY ARRAY
PORTAL GETOWN ; [234] 15-GET OWN SPACE
PORTAL GETCLR ; [234] 16-GET OWN SPACE - ZEROED
PORTAL MONIT ; [234] 17-MONITOR
PORTAL MONIT0 ; [234] 20-MONITOR WITH BREAK
PORTAL RDOCT ; [234] 21-READ OCTAL WORD
PORTAL PROCT ; [234] 22-PRINT OCTAL HALFWORD
PORTAL INBYTE ; [234] 23-INPUT BYTE
PORTAL OUBYTE ; [234] 24-OUTPUT BYTE
PORTAL NXTBYT ; [234] 25-NEXT INPUT BYTE (LOOK AHEAD)
PORTAL BRKBYT ; [234] 26-BREAK OUTPUT
PORTAL INCHAR ; [234] 27-READ CHARACTER
PORTAL OUCHAR ; [234] 30-OUTPUT CHARACTER
PORTAL BRKCHR ; [234] 31-BREAKCHARACTER
PORTAL READ. ; [234] 32-READ
PORTAL PRINT. ; [234] 33-PRINT
PORTAL SELIN ; [234] 34-SELECT INPUT
PORTAL SELOUT ; [234] 35-SELECT OUTPUT
PORTAL INPT ; [234] 36-INPUT
PORTAL OUTPT ; [234] 37-OUTPUT
PORTAL RELESE ; [234] 40-RELEASE
PORTAL OPFILE ; [234] 41-OPEN FILE
PORTAL CLFILE ; [234] 42-CLOSE FILE
PORTAL XFILE ; [234] 43-TRANSFER FILE
PORTAL BSPACE ; [234] 44-BACKSPACE
PORTAL ENFILE ; [234] 45-ENDFILE
PORTAL REWND. ; [234] 46-REWIND
PORTAL STRASS ; [234] 47-STRING ASSIGNMENT
PORTAL FUNCT ; [234] 50-OVERLAY HANDLER
PORTAL TRLPRT ; [234] 51-PRINT TRACE LIST
PORTAL TRLAB ; [234] 52-TRACE LABEL ENTRY
PORTAL TRSTD ; [234] 53-TRACE STANDARD FUNCTION
PORTAL STRDEC ; [234] 54-DECLARE STRINGS
PORTAL DDDUMP ; [234] 55-DDT DUMP ROUTINE.
PORTAL INCHR0 ; [234] [E145] 56-READ CHARACTER WITH EOF LEGAL
>
ALGDIR ; CALL ALGDIR MACRO
PURGE PORTAL ; [234] KILL PORTAL MACRO
SUBTTL VARIOUS DEFINITIONS
; GETTAB NUMBERS
.GTCNF==11 ; CONFIGURATION TABLE
%CNYER==56 ; YEAR
%CNMON==57 ; MONTH
%CNDAY==60 ; DAY
%CNHOR==61 ; HOUR
%CNMIN==62 ; MINUTE
%CNSEC==63 ; SECOND
END