Trailing-Edge
-
PDP-10 Archives
-
decuslib10-07
-
43,50433/pasunv.mac
There are 4 other files named pasunv.mac in the archive. Click here to see a list.
universal PASUNV - Symbols for PASCAL runtimes
if1,< printx Be sure to recompile RUNTIM,RANDIO,PASLNK, and XIO2>
.directive .nobin
;REGISTER DEFINITION
AC0=0
AC1=1
REGIN=1 ;INITILISATION OF REGISTERSTACK
REG= REGIN+1
REG1=REGIN+1+1
REG2=REGIN+1+2
REG3=REGIN+1+3
REG4=REGIN+1+4
REG5=REGIN+1+5
REG6=REGIN+1+6
JBFFLW=14
NEWREG=15
BUFFER=15
BASIS=16
P=17
KA10SW==0
;DESCRIPTION OF FILEBLOCK( SEE WRITEMC)
FILPTR= 0 ;pointer to filcmp
FILEOF= 1 ;input: 0 = normal state
; 1 = eof or error - no more data in file (some
; errors will allow reading to continue, and
; thus will NOT set FILEOF)
;output:1 = normal state
; 0 = error (but program will abort so this will
; never show up)
FILEOL= 2
filr11= 3
filget= 3
filput= 4
filr99= 5
filgtx=0
filptx=1
filclo=2
filbki=3
filbrk=4
filcrp=5
filstp=6
filshl=7
filfxl=10
filadv= 6
filbad= 7
filchn=10
FILSTA=11 ; .+0 FOR FILESTATUS
FILDEV=12 ; .+1 FOR DEVICE
FILBFP=13 ; .+2 FOR POINTER TO BUFFERHEADER
;This is used to check how the file has been
;openned. If it is non-zero, it is known that
;the file has been openned (though the open
;may have failed - all we really know is that GETCHN
;succeeded). If RH non-zero it is for input, if
;LH non-zero it is for output. This is true even
;for dump mode I/O.
FILNAM=14
FILEXT=15
FILPRO=16
;This is as good a place as any to explain the structure of the path
;used here. FILPPN to FILPPN+5 are the path. FILPPN is the PPN,
;and the rest are SFD's. REOPEN ignores what is in the PPN field
;of the lookup block. Instead if FILPPN is zero, it zeros the PPN
;field. Otherwise it makes the PPN a pointer to the path block.
;Since FILPPN is word 2 in the path, this means that the PPN is
;set as a pointer to FILPPN-2. To save space, we violate two
;things here:
; (1) the path overlaps other things. In particular word 1 of
; the path block turns out to be the PPN, which is a
; pointer to the path block. Word 1 is supposed to be
; either 0,1, or 2. 1 or 2 specify the scan switch, and
; 0 says use the default. Apparently values other than
; 1 or 2 also cause it to use the default, because our word 1
; is guaranteed to be a pointer, and we still get the default.
; (2) the path is supposed to end with a zero. When we have all
; 5 allowed SFD's, we do not have room to terminate it with
; a zero. The monitor seems to know when it has reached
; SFDLVL depth and not try looking further, so that has not
; caused us trouble.
FILPPN=20
FILBFH=26 ;BUFFER HEADER
FILBTP=27 ;BYTE POINTER
FILBTC=30 ;BYTE COUNT IN BUFFER
FILLNR=31 ;IF ASCII MODE - LINENR IN ASCIICHARACTERS
FILCNT=32 ;LH= if non-text file: neg. number of words in comp.
; if text file: zero
;test sign bit of this loc to see if an ASCII file
;RH= ADDRESS OF FIRST WORD IN COMPONENT
filphb=33 ;last physical block input or output
filrcs=34 ;LH=physical block size, bytes
;RH=size of last record input or output, bytes
filerr=35 ;LH= errors that have happened; RH=errors allowed
filst1=36 ;mode-dependent - usally bits in LH:
fillcm=400000 ;map lower case
filmta=200000
filind=100000
filfop= 40000 ;force normal open
filblk= 20000 ;blocked
filctm= 10000 ;is controlling terminal
filsel= 4000 ;wants to see end of line char
filtmp= 2000 ;this is a "temp" file - delete when released
filst2=37 ;mode-dependent
filtst=40 ;314157 if the file block is legal
;41 - spare
filcht=42 ;character mapping table
FILCMP=43 ;FIRST WORD OF COMPONENT
;here follow Tops-20 definitions so we can compile PASNUM.
;new modules should use these definitions
kacpu==ka10sw
klcpu==0
tops10==1
t=0
a=1
b=2
c=3
d=4
e=5
f=6
g=7
h=10
i=11
j=12
k=13
l=14
n=15
o=16
ife klcpu,< ;[6] start
define adjstk (ac,off),<
ifl off, <sub ac,[xwd -off,-off]>
ifge off, <add ac,[xwd off,off]>>
>
ifn klcpu,<
define adjstk (ac,off),<
adjsp ac,off>
> ;[6] end
end