Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0078/libsim/filest.mac
There are 2 other files named filest.mac in the archive. Click here to see a list.
00100 COMMENT * SIMULA specification;
00200 OPTIONS(/E:QUICK,ZYLILL);
00300 PROCEDURE illegal;
00400 COMMENT Dummy procedure, should not be called from SIMULA.
00500 ;
00600
00700 !*;! MACRO-10 code !*;!
00800
00900 SUBTTL FILEST, File definition string
01000
01100 ;!*** Copyright 1977 by the Swedish Defence Research Institute. ***
01200 ;!*** Copying is allowed. ***
01300
01400 Comment \
01500
01600 Purpose:To form a string from a file lookup/enter block
01700 Input: If X2 is a lookup blk ptr, X0 has sixbit device name.
01800 X1: Destination designator for specification string -
01900 either byte pointer or address of subroutine for
02000 handling one character.
02100 X2: File designator - either REF(file) or pointer to
02200 LOOKUP/ENTER block (may be extended format)
02300 X3: Zero or format control flags (see below)
02400 X4: XWD -n,pointer to work area of n words (for PATH. blk etc)
02500
02600 Output: File specification, one character at a time, in X1.
02700 Each byte is transmitted to the destination via a
02800 subroutine pointed to by XOB in this procedure.
02900 The string format is:
03000 dev:file.ext[path]<prot> (TOPS-10)
03100 str:<directory>file.ext.,Pnnnnnn (TOPS-20)
03200 Protection is only output on demand.
03300 Null fields are not output.
03400 \
03500
03600 TITLE filest, file to string translation
03700 SUBTTL SIMULA utility, Lars Enderin FOA June 1977
03800
03900 SEARCH UUOSYM,SIMMAC,SIMMCR,SIMRPA
04000 SALL
04100 MACINIT
04200
04300 ENTRY .FILST
04400
04500 XOB==X5 ;!Contains instruction to handle one byte in X1.
04600 P==XPDP ;!Push-down pointer
04700
04800 OPDEF OUTOCT [XEC .OUTOC]
04900 OPDEF SIXASC [XEC .SIXAS]
05000 OPDEF FILEST [XEC .FILST]
05100 OPDEF OUTBYTE [XCT XOB]
05200 OPDEF OUTPPN [XEC .OUTPP]
05300
05400 DEFINE OUTC(C)<
05500 LI X1,C
05600 OUTBYTE>
05700
05800 DEFINE DELIM(C)<
05900 LI X1,C
06000 TRNE X7,1
06100 OUTBYTE>
06200
06300 ;!Format control bits in X3 (X7):
06400 ;!-------------------------
06500
06600 RADIX 10
06700
06800 DEFINE Z(F,M,N)<DF ZJS'F,0,M,N>
06900 DEFINE X(F)<
07000 IRP F,<
07100 N==N+3
07200 Z F,3,\N
07300 >>
07400 DEFINE Y(F)<
07500 IRP F,<N==N+1
07600 Z F,1,\N
07700 >>
07800
07900 DEFINE OUTCHK(f,def)<
08000 STACK def
08100 LF X1,ZJS'f(,X7)
08200 XEC .OUTCK
08300 UNSTK (P)
08400 >
08500
08600 N==-1
08700 X<DEV,DIR,NAM,TYP,GEN,PRO,ACT>
08800 N==20
08900 Y<TMP,SIZ,CRD,LWR,LRD>
09000 N==31
09100 Y<PSD,TBR,TBP,PAF>
09200 RADIX 8
09300 .JSNOF==0
09400 .JSAOF==1
09500 .JSSSD==2