Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50366/recsmb.mac
There are no other files named recsmb.mac in the archive.
	REPEAT 0,<SUBRUTINAS PARA ARIMETICA ENTERA >


	REPEAT 0,<SUBRUTINA PARA CONVERTIR UNA CADENA ASCII

		EN UN NUMERO ENTERO >

C.NUM:	TLNE FLAG,PDLARG
	JRST .+3
	PUSHJ REC,PREPQ
	POP TXPD,QTEXT0
	SETZB AC1,AC3
	CLEAR TEM,
	OK (TEXT1,TEXT3,C.NUM3+2)
	MOVE AC2,TEXT1
C.NUM1:	ILDB CHREC,AC2
	CAIE CHREC,"-"
	JRST .+5
	SETO AC3,
C.NUM2:	OK(AC2,TEXT3,C.NUM3)
	ILDB CHREC,AC2
	CAIG CHREC,71
	CAIGE CHREC,60
	JRST C.NUM3
	ANDI CHREC,17
	ADD AC1,CHREC
	MOVEM AC1,TEM
	IMULI AC1,12
	JRST C.NUM2
C.NUM3:	SKIPGE ,AC3
	MOVN TEM,TEM
	PUSH TXPD,TEM
	POPJ REC,


	REPEAT 0,<INSERTA UN NUMERO ENTERO COMO CADENA ASCII

		EN EL TEXTO,TOMANDO ESTE NUMERO DEL TXPD.>
O:	POP TXPD,QTEXT0
	PUSH TXPD,QTEXT0
	PUSHJ REC,O.NUM0
	CLEAR AC1,
	IDPB AC1,AC2
	MOVE QTEXT0,[POINT 7,NARG,]
	HLRZ ,TXPD
	CAIL ,146
	JRST OVL
	PUSH TXPD,QTEXT0
	PUSHJ REC,I
	POP TXPD,QTEXT0
	POPJ REC,
O.NUM0:	MOVE ,QTEXT0
	MOVE AC2,[POINT 7,NARG,]
	JUMPGE ,.+4
	MOVN ,
	MOVEI AC1,"-"
	IDPB AC1,AC2
DECINS:	IDIVI ,12
	PUSH REC,1
	SKIPE
	PUSHJ REC,DECINS
	POP REC,
	ADDI ,60
	IDPB ,AC2
	POPJ REC,

N:	POP TXPD,
	PUSH TXPD,
	SKIPGE
	AOS (REC)
	POPJ REC,

	REPEAT 0,<SURUTINA PARA PREGUNTAR SI EL ULTIMO NUMERO

		EN EL PLD ES CERO.>

H:	POP TXPD,
	PUSH TXPD,
	SKIPN
	AOS (REC)
	POPJ REC,


	REPEAT 0,<SUBRUTINAS PARA EFECTUAR LAS OPERACIONES

		ARITMETICAS CON LOS DOS ULTIMOS ELEMENTOS DEL PDL.>

SUMA:	POP TXPD,
	POP TXPD,AC2
	ADD ,AC2
	PUSH TXPD,
	POPJ REC,

RESTA:	POP TXPD,
	POP TXPD,AC2
	SUB AC2,
	PUSH TXPD,AC2
	POPJ REC,

MULT:	POP TXPD,
	POP TXPD,AC2
	IMUL ,AC2
	PUSH TXPD,
	POPJ REC,

DIV:	POP TXPD,
	POP TXPD,AC2
	IDIV AC2,
	PUSH TXPD,AC2
	POPJ REC,

MOD:	POP TXPD,
	POP TXPD,AC2
	IDIV AC2,
	PUSH TXPD,AC3
	POPJ REC,




	REPEAT 0,<SUBRUTINA PARA LLAMAR AL COMPILADOR REC>

C:	PUSHJ REC,L
	CLEAR
	HLLZ AC1,[POINT 7,,]
	ILDB CHREC,QTEXT0
	IDPB CHREC,AC1
	JUMPN CHREC,.-2
	CAMN ,[ASCII "PDL"]
	JRST CPDL
	CAMN ,[ASCII "WKS"]
	JRST CWKS
	CAME ,[ASCII "FIL"]
	JRST CERR
	PUSHJ REC,RECCOM
	PUSHJ REC,REA
	POPJ REC,
RECCAX:	AOS (REC)
	POPJ REC,
CPDL:	POP TXPD,QTEXT0
	PUSH TXPD,QTEXT0
	PUSHJ REC,RECCOM
	PUSHJ REC,REA.1
	POPJ REC,
	JRST RECCAX
CWKS:	MOVEM TEXT1,TEXTR
	PUSHJ REC,RECCOM
	PUSHJ REC,REA.2
	POPJ REC,
	JRST RECCAX


RTEXT1:	MOVE TEXT1,TEXT11
	POPJ REC,

DATE0:	PUSHJ REC,PREPQ
	MOVEM TXPD,TS1
	JSA 16,DATE
	JUMP IDATE
DATE.1:	MOVE TXPD,TS1
	HRRZI AC1,^D9
	HRRI AC2,IDATE
	HLL AC2,[POINT 7,,]
	ILDB CHREC,AC2
	IDPB CHREC,QTEXT0
	SOJG AC1,.-2
	IDPB AC1,QTEXT0
	JRST Q.RET


TIME0:	PUSHJ REC,PREPQ
	MOVEM TXPD,TS1
	SETZM IDATE
	SETZM IDATE+1
	JSA 16,TIME
	JUMP IDATE
	JUMP IDATE+1
	JRST DATE.1

RTIME:	TLNE FLAG,PDLARG
	JRST .+3
	PUSHJ REC,PREPQ
	POP TXPD,QTEXT0
	CALL QTEXT0,[SIXBIT /PJOB/]
	CALL QTEXT0,[SIXBIT /RUNTIM/]
	PUSH TXPD,QTEXT0
	POPJ REC,


RWS:	MOVE AC1,@LTEXT
	JUMPE AC1,ERLIST
	MOVE TEM,LTEXT
	MOVE ,1(TEM)
	MOVEM ,TEXT0
	MOVE ,LTEXT
	ADDI ,2
	HLL [POINT 7,,]
	ILDB CHREC,
	JUMPE CHREC,.+3
	IDPB CHREC,TEXT3
	JRST .-3
	MOVE @LTEXT
	MOVEM LTEXT
	POPJ REC,

SWS:	HRRZ AC1,TEXT3
	CAML AC1,LTEXT
	JRST NME
	MOVEM TEXT1,TEXT11
	MOVEM TEXT2,TS2
	HRRZ ,TEXT2
	SUB AC1,
	ADDI AC1,1
	MOVE ,LTEXT
	SUB ,AC1
	MOVEM ,TEM
	HLL [POINT 7,,]
	OK (TEXT2,TEXT3,SWS.1)
	ILDB CHREC,TEXT2
	IDPB CHREC,
	JRST .-4
SWS.1:	CLEAR CHREC,
	IDPB CHREC,
	MOVE ,TEXT0
	MOVEM ,-1(TEM)
	MOVE ,LTEXT
	MOVEM ,-2(TEM)
	SUBI TEM,2
	MOVEM TEM,LTEXT
	MOVE TEXT2,TS2
	MOVEM TEXT2,TEXT3
	MOVEM TEXT1,TEXT0
	MOVEM TEXT1,TEXT11
	POPJ REC,



PPN:	PUSHJ REC,PREPQ
	MOVEM TXPD,TS1
	JSA 16,SYSJO
	JUMP IDATE
	MOVE TXPD,TS1
	HRRI AC1,IDATE
	HLL AC1,[POINT 7,,]
	ILDB CHREC,AC1
	IDPB CHREC,QTEXT0
	CAIE CHREC,"]"
	JRST .-3
	JRST Q.RET

NECHO:	SETO AC2,
	TTCALL 6,AC2
	TLO AC2,000004
	TTCALL 7,AC2
	POPJ REC,

YECHO:	SETO AC2,
	TTCALL 6,AC2
	TLZ AC2,000004
	TTCALL 7,AC2
	POPJ REC,

OPEN:	PUSHJ REC,CLARG
	HRRI AC1,ARGIO
	HLL AC1,[POINT 7,,]
	POP TXPD,QTEXT0
	PUSH TXPD,QTEXT0
	ILDB CHREC,QTEXT0
	IDPB CHREC,AC1
	JUMPN CHREC,.-2
OPEN3:	CAME ,[ASCII "READ"]
	JRST .+4
	PUSHJ REC,O.RD
	JRST OPEN5
	JRST OPEN4
	PUSHJ REC,O.RW
	JRST OPEN5
OPEN4:	MOVEI CHREC,"T"
	PUSHJ REC,PREPQ
	IDPB CHREC,QTEXT0
	JRST Q.3
OPEN5:	MOVEI CHREC,"F"
	JRST OPEN4+1
	POPJ REC,

RUN:	PUSHJ REC,CLARG
	HRRI AC1,ARGIO
	HLL AC1,[POINT 7,,]
	POP TXPD,QTEXT0
	PUSH TXPD,QTEXT0
	ILDB CHREC,QTEXT0
	IDPB CHREC,AC1
	JUMPN CHREC,.-2
	PUSHJ REC,F.SP
	HRLZ AC1,JOBFF
	HRRZI AC1,F.DEV
ERUN:	CALLI AC1,35
	JRST OPEN5
	JRST OPEN4

DELET:	MOVE [ASCII "READ"]
	PUSHJ REC,OPEN
	SETZM F.NAM
	POP TXPD,QTEXT0
	RENAME INCHN,F.NAM
	JRST OPEN5
	JRST OPEN4


CHINP:	TRZE FLAG,EXEC
	JRST STAR.T
	TRO FLAG,REENTC
	TTCALL 3,DEFINP
	POP REC,
	TTCALL 11,0
	JRST REENT
	IFE PURE,<
REENT:	CALL [SIXBIT /EXIT/]
		>
STAR.T:	TTCALL 3,ERREX
	CALL [SIXBIT /EXIT/]
NME:	TTCALL 3,ERM1
	CALL [SIXBIT /EXIT/]
ERLIST:	TTCALL 3,NEXLST
	CALL [SIXBIT /EXIT/]
ERPDL:	TTCALL 3,ERRPDL
	CALL [SIXBIT /EXIT/]
OVL:	TTCALL 3,PDLOVL
	CALL [SIXBIT /EXIT/]
ERK:	TTCALL 3,ERRK
	CALL [SIXBIT /EXIT/]
CERR:	TTCALL 3,CER
	CALL [SIXBIT /EXIT/]
ILF:	TTCALL 3,ILFF
	CALL [SIXBIT /EXIT/]


ERF4:	ASCIZ /
NO EXISTE PROGRAMA PRINCIPAL FORTRAN./
ERREX:	ASCIZ /
EXPR "REC" INCOMPLETA./
DEFINP:	ASCIZ /
EOF, NO SE HA DEFINIDO PROGRAMA PRINCIPAL./
CER:	ASCIZ /
ARG. ILEGAL PARA *PR* C./
ILFF:	ASCIZ /
FUNCION ILEGAL./
ERRK:	ASCIZ /
NUMERO ILEGAL DE REGISTRO./
ERRPDL:	ASCIZ /
INDICE FUERA DE RANGO PARA EL *OP* ^/
PDLOVL:	ASCIZ /
PDL OVERFLOW/
NEXLST:	ASCIZ /
NO FUE DEFINIDA UNA SUBLISTA./
ERM1:	ASCIZ /
LISTA LLENA /


TEX00:	POINT 7,TEXTO-1,34
LOW2:	POINT 6,TEXT1,5
TXPDG:	XWD 0,TXPDL-1

	LIT
	IFN PURE,<LOC 140>


	REPEAT 0,<SUBRUTINA PARA LEER UN CARACTER>

LEECA:	PUSHJ REC,REA
	JRST CHINP
	POPJ REC,

CSBR:	PUSHJ REC,LEECA
	SUBI CHREC,40
CSBR.1:	ADDI CHREC,TDCSR
	HRLI CHREC,260760
	PUSH ACOMP,CHREC
	PUSHJ REC,SF
	POPJ REC,


DP:	PUSHJ REC,LEECA
	CAIG CHREC,40
	JRST .-2
	CAIN CHREC,"@"
	JRST ERR3
	HRRZ AC1,APCOM0
	SUBI CHREC,40
DP.1:	ADDI CHREC,TDCSR
	HRRZM AC1,(CHREC)
	HRRZM ACOMP,APCOM0
	AOS APCOM0
	TRZ FLAG,PARENT+EXEC
	JRST TRAECA

SAC:	BLOCK 20
TS1:	BLOCK 1
TS2:	BLOCK 1
TS3:	BLOCK 1
TS4:	BLOCK 1
LTEXT:	XWD 0,TEXTO+WKSIZE
IDATE:	BLOCK 3
APCOM0:	BLOCK 1
XPDL:	BLOCK 17
YPDL:	BLOCK 17
ZPDL:	BLOCK 17
F.DEV:	BLOCK 1
F.NAM:	BLOCK 5
ARGIO:	BLOCK 5
O.RI:	BLOCK 1
O.R1:	BLOCK 1
O.RB:	BLOCK 1
O.WI:	BLOCK 1
O.WD:	BLOCK 1
O.WB:	BLOCK 1
IB:	BLOCK 3
OB:	BLOCK 3
IBUF1:	BLOCK 406
OBUF1:	BLOCK 406
IT1:	BLOCK 1
TEXT11:	BLOCK 1
TEXT0:	POINT 7,TEXTO,
TEXT3:	BLOCK 1
TEXTR:	BLOCK 1
	BLOCK 1
PP:	BLOCK 1
QTEXT:	BLOCK 1
NARG:	BLOCK 3
S0:	BLOCK 21
S1:	BLOCK 21
S2:	BLOCK 21
S3:	BLOCK 21
S4:	BLOCK 21
S5:	BLOCK 21
S6:	BLOCK 21
S7:	BLOCK 21
S8:	BLOCK 21
S9:	BLOCK 21
APUSH:	BLOCK PDLSIZ
TXPDL:	BLOCK QPDL
TEXTG:         BLOCK QSIZE

TEXTO:	BLOCK WKSIZE+1
TDCSR:	BLOCK 1
	IFN PURE,<END START>
	IFE PURE,<END>
IIIAAAA>>AAA>						AA@@@@IIIA			``'EEI1*U*3?9>h