Google
 

Trailing-Edge - PDP-10 Archives - CFS_TSU04_19910205_1of1 - update/ietsrc/ibmmac.unv
There are 22 other files named ibmmac.unv in the archive. Click here to see a list.
x
,U@P I$z 	WhMc

  DEFI	XNE $ (NAM,SIZ,CNT	X0,LVL) <
    $$ 	XPA,NAM,\..WD,B,\.	Xp.BT,SIZ,CNT,LVL
	Y   >;end DEFINE $	Y0

  DEFINE $$. 	YP(NAM,SIZ,OB,OW,BT	Yp,WD,CNT) <
	ZP $	Z$$. A,NAM,OB,OW,	Z0BT,WD,B,SIZ,CNT
   >;end DEFINE 	Zp$$.

  DEFINE $	[$$$ (NAM,BIT,SIZ,	[0WRD) <
    $$$$$	[P A,NAM,BIT,SIZ,	[pB,WRD
   >;end D	\EFINE $$$$

  .	\0.WD==0
  ..BT==-1

   ..BT==-S6YP 
S6Z7P S6i9P S6zP a  
pQp
3		
	$SAVE
(	<T1,T2,P4>			
	
HMOVEI	T3,B				

hQQ==0
IFNB <D>,
<QQ==PVALSZ>
	JU
(MPE	T3,.+3+QQ			
H
	PUSHJ	P,A				
h
	JUMPF	.RET				

	PVALSV	D				

(;	ADD	T1,T3				

H;	SUB	T2,T3				

h	PUSH	P,T1
	PUSH
	P,T2
	PUSH	P,T3
(
	PATGO
	POP	P,
HT3
	POP	P,T2
	P
hOP	P,T1
	AOS	T3

QQ==0
IFG C,<
(
QQ==2
	CAILE	T3
H,C
	$RET>
	CAM
hLE	T3,T2
	$RET

	JRST	.-<15+QQ>
RST	.-<15+QQ>
SQA0S-1a  	~PP+
ZZZ==ZZZ	~p+1
ZZ==0
	$SAVE		<T4,P1,P2,P3,P4,	0S1,S2,P-1>	
	PUS
PH	P,T1				
	MOVE
p	P-1,P				
	PATG
O	INIT				
	POP	
0P,T1				
	JRST	.
PRETF				
IRP A 
p<					
	PAT.	A

>
PATTG						

0	MOVE	P,P-1				

P	MOVE	T3,T1				

p	POP	P,T1				
	S
UB	T3,T1				
	AD
0D	T2,T3				
	JRST	.RETT				
RSa!` 
PPE				
PAT.. A
			
PAT.a!c@ 
	PI			
PATTG
	A	B
PATTGa${` 
pP1				
	PAT
GO.	\ZZ,\ZZZ,A			
ZZ,\ZZZ,A		a${g 
PPA			
IFB <
pC>,<
	PUSHJ	P,.
PSTR2			
>;END I
0FB <C>
IFNB <C
P>,<
	PUSHJ	P,.PS
pTR3
>;END IFNB <
C>
	PUSHJ	P,%APB			
J	P,%Aa&I` 
	PPO					
PAT
	pTG. \ZZ,\ZZZ
ZZ==ZZ+1
ZZZ
ZZ=a&Ig 

0PS			
%APB:
			
%APa
,p 

pPY				
	PAT
GO					
	$RET					
	
	$RET			aF  
PQ?				
	CAI
pLE	T3,1				
	JRS
T	.RETF				
	$SA
0VE	<P1,T4>				
	
PPUSHJ	P,.PSTR0			
p
	ILDB	S1,P1				

	CAIE	S1,"A"		
0		
	JRST	.RETF		
P		
	MOVEI	T3,1		
p		
	JRST	.RETT				
RST	.RETT		at@ 
+XR_
	JUMPN	T
+x2,.RETF
	PATGO
.RETF
	PATGO
a@ 
Q				
	$SA
0VE	<T1,T2,P3>			
P
	MOVE	P3,T3				
p
	SETZ	T3,				
	
PUSHJ	P,A				
	
0JUMPF	.RET				
	
PCAMGE	T3,P3				

p	$RET					
	PVAL
SV	B				
;	ADD	
0T1,T3				
;	SUB	
PT2,T3				
	PATGO
p					
	$RET					
	
	$RET					af@ 
PPm				
	PAT
pGO					
QQ==.			
			
	SOS	T2				
0
	JUMPLE	T2,.RETF
P			
	AOS	T1				
p
IFDEF FTDEBUG <

	SKIPG	T1				
	
0HALT					
>;end 
PIFDEF FTDEBUG
	JRST	QQ-1				
Ja? 
&xRY			
	$SAV
'E	<P1,P2,P3,S1>		
'8
IFNB <B>,<SETO
'XM	B>			
	MOVE	P
'x3,T3			
	DMOVE	P
(1,T1			
IRP A,<
(8	DMOVE	T1,P1			

(X	MOVE	T3,P3			
	
(xPUSHJ	P,A			
IF
)NB <B>,<AOS	B>	
)8		
QQ==0					
I
)XFNB <C>,<QQ==PVA
)xLSZ>			
	JUMPF	.
*+3+QQ			
	PVALSV
*8	C			
;	ADD	T1,
*XT3			
;	SUB	T2,T
*x3			
	PATGO				
+
>;end IRP A
	JRST	.RETF			
JaO` 
hR3
3		
	CAMLE
	T3,T2			
	JRST	
8.RETF			
	$SAVE	
X<T1,T2,P1,P2,P3,T
x4>	
	PUSHJ	P,.PS
 TR0		
	SETZ	T4,	
 8		
	MOVE	P2,A		
 X	
	HLRZ	P3,P2			
 x
	HRLI	P2,440700
!		
	PUSH	P,P3			
!8
	PUSH	P,P2			

!XQQ==0					
					
!x
IFG B,<	CAIL	T
"4,B			
	JRST	.+
"810			
QQ==2>				
"X	
	ILDB	S1,P1			
"x
	MOVE	P2,0(P)		
#	
	MOVE	P3,-1(P)
#8		
	ILDB	S2,P2		
#X	
	CAMN	S1,S2			
#x
	AOJA	T4,.-<5+Q
$Q>		
	SOJG	P3,.-
$83			
	POP	P,S1

$X	POP	P,S1
	SKIPE
$x	T4			
	CAMGE	T4
%,T3			
	JRST	.RE
%8TF			
	MOVE	T3,T
%X4			
	PVALSV	C	
%x		
;	ADD	T1,T3		
&	
;	SUB	T2,T3			
&8
	PATGO				
	JRST	.RET			
	JRSQr-1 P	aO&  
0Q)				
	$SA
PVE	<P1,P2,P3,T4>	
p		
	MOVE	P2,A		
		
	HLRZ	P3,P2		
0		
	CAMLE	T3,P3	
P			
	JRST	.RETF	
p			
	MOVE	T4,P3	
			
	HRLI	P2,440
0700			
	PUSHJ	P,
P.PSTR0			
	ILDB	
pS1,P1				
	ILDB	
S2,P2				
	CAME	
0S1,S2				
	JRST	
P.RETF				
	SOJG	
pP3,.-4				
	MOVE
	T3,T4				
	JRST	.RETT				
RSTaZ
,8Rk			
PVALS
,XZ==2				
IFNB <
,xA>,<
	HRLM	T3,A
-			
	HRRM	T1,A	
-8		
>;end IFNB <A>
end IFNB <e0 	}POq
IRP A,<	}p
..RF==A
>;end	~ IRP A
PURGE ..RF
A
PURGE ..e>0 
-xR}
DEFINE R
.(N) <				
	R'N==
.8N
>;end DEFINE R
.X

..==0					;Co
.xunter
	REPEAT 20
/,<
	R	\..			;gen
/8erate register na
/Xme
..==..+1
>;end REPEAT 20
eg/P 	PO}
.SKP (E,A,B,C)
 (E,g/p 
PP
.SKP (G,A,B,C)
 (G,g/y  
P
.SKP (GE,A,B,C)
(GEg/@ 
PP
.SKP (L,A,B,C)
 (L,g/I  
P	
.SKP (LE,A,B,C)
(LEg/` 
P
.SKP (N,A,B,C)
 (N,mKc@ 1;BYTE (3)A9WHO (9)AVER (6)AMIN (18)AEDT 	\pN;

 ..TM=	]=0

 IFB <F>,<	]0
  IFB <B>,<
 	]P  IFGE ..BT,<
  	]p   ..WD==..WD+1
	^     ..BT==-1
	^	^0  >;end IFN ..BT
   ..TM==1
   >	^p;end IFB B
  >;	_end IFB F

 IF	_0E ..TM,<
   ..CT	_P==1
   IFNB <G>	_p,<..CT==G>
   .	`.SZ=^D36
	`PIFNB	`0 <F>,<..SZ==F>
   ..OB==..BT
 	`p  ..OW==..WD

 	a  REPEAT ..CT,<
	a0    ..BT=..BT+..S	aPZ
     IFG <..BT	ap-^D35>,<
       	b..WD=..WD+1
    	b0   ..BT=..SZ-1
 	bP     >;end IFG <.	bp.BT-^D35>

    	c IFNB <B>,<
   	c0   IFE ..TM,<
	$	cP$$$ B,\..BT,\..S	cpZ,\..WD
        	d..RX==10
       	d0 RADIX ^D10
	DEF	dPSTR (A.B,A$B(	dpD),\..BT,\..SZ)
        RADIX ..	e0RX
       >;end 	ePIFE ..TM
      .	ep.TM==..TM+1
    	f >;End IFNB B
	f0
    IFNB <H>,<$	fP$$ H,\..OB,\..OW	fp,\..BT,\..WD>
  	g >;End Repeat ..C	g0T
  >;End IFE ..TM
 End IFE ..  	gpNK


  DEFI	hNE $. (NAM,SIZ,CN	h0T) <
    $$. NAM	hP,SIZ,B,C,D,E,	hpCNT
   >;end DEF	iINE $.

  ..BT1	i0==B
  ..WD1==C
 
  ..WD1==C A 	xpOK

  A$B=	y=F
  DEFINE A%	y0B<A$B(E)>
 B<A$B(E)>
 !` 	ipOC
  ..TM1=	j=0
	jIFB <H>,<
    IFB <B>,<
	jP      ..WD1==..WD	jp1+1
      IFG <.	k.WD1-F>,<PRINTX 	k0?Sublevel overflo	kPwed top for A.B	kp>
      ..BT1==0	l
      IFE <..WD	l01-F>,<
        	lPIFG <..BT1-E>,<P	lpRINTX ?Sublevel o	mverflowed top bit	m0s for A.B>
   	mP    >;end IFE <..	mpWD1-F>
      ..	nTM1==1
     >;en	n0d IFB,<B>
   >;	nPend IFB,<H>

 	np IFE ..TM1,<
   	o ..CT1==1
    ..	o0SZ1==^D36
    IF	oPNB <I>,<..CT1==	opI>
    IFNB <H>	p,<..SZ1==H>

 	p0   REPEAT ..CT1,<	pP
      ..BT1==..	ppBT1+..SZ1
      	qIFG <..BT1-^D35>,	q0<
	..WD1==..WD1+	qP1
	IFG <..WD1-F	qp>,<PRINTX ?Sub le	rvel overflows top	r0 for A.B>
	..B	rPT1==..SZ1-1
	IFE	rp <..WD1-F>,<
	 	s IFG <..BT1-E>,<	s0PRINTX ?Sub level	sP overflows top bi	spts for A.B>
	 	t>;end IFE <..WD1-	t0F>
       >;end	tP IFG <..BT1-^D35>	tp

      IFNB <	uB>,<
	IFE ..TM1,	u0<
	  $$$$ B,\..	uPBT1,\..SZ1,\..WD1	up
	  ..RX==10
	 	v RADIX ^D10
	  D	v0EFSTR (A.B,A$	vPB(G),\..BT1,\..S	vpZ1)
	  RADIX ..R	wX
	 >;end IFE ..	w0TM1
	..TM1==..TM	wP1+1
       >;end	wp  IFNB <B>
    	x >;end REPEAT ..C	x0T1
   >;end IFE ..TM1
 nd IFE 
u1A 
S@P &\zP$N^ 	ypO]

	CAIA
		zJRST	e
	LOAD	.S	z0AC,C,D
IFNB <	zPB>,<
	SKIPA	B,	zp.SAC
>;end IFNB 	{<B>
IFB <B>,<
	SKIPA	.SAC
>;	{Pend IFB <B>
e:
IFB <B>
e:N^	w 	|Oi
IRP A,<	|0
DEFINE SKPA (A	|PC,Y,STR) <
.SKP 	|p(A,AC,Y,STR)
>;	}end DEFINE SKPA
>;end IRP A
>}{woP