Google
 

Trailing-Edge - PDP-10 Archives - BB-J724B-SM_1982 - sources/ibmmac.unv
There are 22 other files named ibmmac.unv in the archive. Click here to see a list.
x
,L@P I$z 	]@N

  DEFI	]hNE $ (NAM,SIZ,CNT	^,LVL) <
    $$ 	^(A,NAM,\..WD,B,\.	^H.BT,SIZ,CNT,LVL
	^h   >;end DEFINE $	_

  DEFINE $$. 	_((NAM,SIZ,OB,OW,BT	_H,WD,CNT) <
	`( $	h$$. A,NAM,OB,OW,	`BT,WD,B,SIZ,CNT
   >;end DEFINE 	`H$$.

  DEFINE $	`h$$$ (NAM,BIT,SIZ,	aWRD) <
    $$$$$	a( A,NAM,BIT,SIZ,	aHB,WRD
   >;end D	ahEFINE $$$$

  .	b.WD==0
  ..BT==-1

   ..BT==-S6YP 
S6Z7P S6i9P S6zP a  
HR
8X		
	$SAVE
	<T1,T2,P4>			
	
 MOVEI	T3,B				

@QQ==0
IFNB <D>,
`<QQ==PVALSZ>
	JU
 MPE	T3,.+3+QQ			
  
	PUSHJ	P,A				
 @
	JUMPF	.RET				
 `
	PVALSV	D				

!;	ADD	T1,T3				

! ;	SUB	T2,T3				

!@	PUSH	P,T1
	PUSH
!`	P,T2
	PUSH	P,T3
"
	PATGO
	POP	P,
" T3
	POP	P,T2
	P
"@OP	P,T1
	AOS	T3
"`
QQ==0
IFG C,<
#
QQ==2
	CAILE	T3
# ,C
	$RET>
	CAM
#@LE	T3,T2
	$RET

#`	JRST	.-<15+QQ>
RST	.-<15+QQ>
SFQn0PP*S5-1a  
(PX
ZZZ==ZZZ
H+1
ZZ==0
	$SAVE
h	<T4,P1,P2,P3,P4,
S1,S2,P-1>	
	PUS
(H	P,T1				
	MOVE
H	P-1,P				
	PATG
hO	INIT				
	POP	
	P,T1				
	JRST	.
	(RETF				
IRP A 
	H<					
	PAT.	A
	h
>
PATTG						


	MOVE	P,P-1				


(	MOVE	T3,T1				


H	POP	P,T1				
	S

hUB	T3,T1				
	AD
D	T2,T3				
	JRST	.RETT				
RSa!` 
(Pr				
PAT.. A
			
PAT.a!c@ 
hPv			
PATTG
	A	B
PATTGa${` 
HP^				
	PAT
hGO.	\ZZ,\ZZZ,A			
ZZ,\ZZZ,A		a${g 
(Pn			
IFB <
HC>,<
	PUSHJ	P,.
hPSTR2			
>;END I
FB <C>
IFNB <C
(>,<
	PUSHJ	P,.PS
HTR3
>;END IFNB <
hC>
	PUSHJ	P,%APB			
J	P,%Aa&I` 
(P|					
PAT
HTG. \ZZ,\ZZZ
ZZ==ZZ+1
ZZZ
ZZ=a&Ig 
Q			
%APB:
			
%APa
,p 
HQ				
	PAT
hGO					
	$RET					
	
	$RET			aF  
(Ql				
	CAI
HLE	T3,1				
	JRS
hT	.RETF				
	$SA
VE	<P1,T4>				
	
(PUSHJ	P,.PSTR0			
H
	ILDB	S1,P1				
h
	CAIE	S1,"A"		
		
	JRST	.RETF		
(		
	MOVEI	T3,1		
H		
	JRST	.RETT				
RST	.RETT		at@ 
10S
	JUMPN	T
1P2,.RETF
	PATGO
.RETF
	PATGO
a@ 
hQ4				
	$SA
VE	<T1,T2,P3>			
(
	MOVE	P3,T3				
H
	SETZ	T3,				
	
hPUSHJ	P,A				
	
JUMPF	.RET				
	
(CAMGE	T3,P3				

H	$RET					
	PVAL
hSV	B				
;	ADD	
T1,T3				
;	SUB	
(T2,T3				
	PATGO
H					
	$RET					
	
	$RET					af@ 
(Q				
	PAT
HGO					
QQ==.			
h			
	SOS	T2				

	JUMPLE	T2,.RETF
(			
	AOS	T1				
H
IFDEF FTDEBUG <
h
	SKIPG	T1				
	
HALT					
>;end 
(IFDEF FTDEBUG
	JRST	QQ-1				
Ja? 
,PS			
	$SAV
,pE	<P1,P2,P3,S1>		
-
IFNB <B>,<SETO
-0M	B>			
	MOVE	P
-P3,T3			
	DMOVE	P
-p1,T1			
IRP A,<
.	DMOVE	T1,P1			

.0	MOVE	T3,P3			
	
.PPUSHJ	P,A			
IF
.pNB <B>,<AOS	B>	
/		
QQ==0					
I
/0FNB <C>,<QQ==PVA
/PLSZ>			
	JUMPF	.
/p+3+QQ			
	PVALSV
0	C			
;	ADD	T1,
00T3			
;	SUB	T2,T
0P3			
	PATGO				
0p
>;end IRP A
	JRST	.RETF			
JaO` 
$@Ra
8p		
	CAMLE
$p	T3,T2			
	JRST	
%.RETF			
	$SAVE	
%0<T1,T2,P1,P2,P3,T
%P4>	
	PUSHJ	P,.PS
%pTR0		
	SETZ	T4,	
&		
	MOVE	P2,A		
&0	
	HLRZ	P3,P2			
&P
	HRLI	P2,440700
&p		
	PUSH	P,P3			
'
	PUSH	P,P2			

'0QQ==0					
					
'P
IFG B,<	CAIL	T
'p4,B			
	JRST	.+
(10			
QQ==2>				
(0	
	ILDB	S1,P1			
(P
	MOVE	P2,0(P)		
(p	
	MOVE	P3,-1(P)
)		
	ILDB	S2,P2		
)0	
	CAMN	S1,S2			
)P
	AOJA	T4,.-<5+Q
)pQ>		
	SOJG	P3,.-
*3			
	POP	P,S1

*0	POP	P,S1
	SKIPE
*P	T4			
	CAMGE	T4
*p,T3			
	JRST	.RE
+TF			
	MOVE	T3,T
+04			
	PVALSV	C	
+P		
;	ADD	T1,T3		
+p	
;	SUB	T2,T3			
,
	PATGO				
	JRST	.RET			
	JRSGR -1aO&  
QV				
	$SA
(VE	<P1,P2,P3,T4>	
H		
	MOVE	P2,A		
h		
	HLRZ	P3,P2		
		
	CAMLE	T3,P3	
(			
	JRST	.RETF	
H			
	MOVE	T4,P3	
h			
	HRLI	P2,440
700			
	PUSHJ	P,
(.PSTR0			
	ILDB	
HS1,P1				
	ILDB	
hS2,P2				
	CAME	
S1,S2				
	JRST	
(.RETF				
	SOJG	
HP3,.-4				
	MOVE
h	T3,T4				
	JRST	.RETT				
RSTaZ
2S			
PVALS
20Z==2				
IFNB <
2PA>,<
	HRLM	T3,A
2p			
	HRRM	T1,A	
3		
>;end IFNB <A>
end IFNB <e0 
(P
IRP A,<
H
..RF==A
>;end
h IRP A
PURGE ..RF
A
PURGE ..e>0 
3PS+
DEFINE R
3p(N) <				
	R'N==
4N
>;end DEFINE R
40

..==0					;Co
4Punter
	REPEAT 20
4p,<
	R	\..			;gen
5erate register na
50me
..==..+1
>;end REPEAT 20
eg/P 
(P*
.SKP (E,A,B,C)
 (E,g/p 
(P:
.SKP (G,A,B,C)
 (G,g/y  
hP>
.SKP (GE,A,B,C)
(GEg/@ 
(P2
.SKP (L,A,B,C)
 (L,g/I  
hP6
.SKP (LE,A,B,C)
(LEg/` 
hP.
.SKP (N,A,B,C)
 (N,mKc@ ,`2hBYTE (3)A-WHO (9)AVER (6)AMIN (18)AEDT 	bHNh

 ..TM=	bh=0

 IFB <F>,<	c
  IFB <B>,<
 	c(  IFGE ..BT,<
  	cH   ..WD==..WD+1
	ch     ..BT==-1
	d	d  >;end IFN ..BT
   ..TM==1
   >	dH;end IFB B
  >;	dhend IFB F

 IF	eE ..TM,<
   ..CT	e(==1
   IFNB <G>	eH,<..CT==G>
   .	eh.SZ=^D36
	f(IFNB	f <F>,<..SZ==F>
   ..OB==..BT
 	fH  ..OW==..WD

 	fh  REPEAT ..CT,<
	g    ..BT=..BT+..S	g(Z
     IFG <..BT	gH-^D35>,<
       	gh..WD=..WD+1
    	h   ..BT=..SZ-1
 	h(     >;end IFG <.	hH.BT-^D35>

    	hh IFNB <B>,<
   	i   IFE ..TM,<
	$	i($$$ B,\..BT,\..S	iHZ,\..WD
        	ih..RX==10
       	j RADIX ^D10
	DEF	j(STR (A.B,A$B(	jHD),\..BT,\..SZ)
        RADIX ..	kRX
       >;end 	k(IFE ..TM
      .	kH.TM==..TM+1
    	kh >;End IFNB B
	l
    IFNB <H>,<$	l($$ H,\..OB,\..OW	lH,\..BT,\..WD>
  	lh >;End Repeat ..C	mT
  >;End IFE ..TM
 End IFE ..  	mHNx


  DEFI	mhNE $. (NAM,SIZ,CN	nT) <
    $$. NAM	n(,SIZ,B,C,D,E,	nHCNT
   >;end DEF	nhINE $.

  ..BT1	o==B
  ..WD1==C
 
  ..WD1==C A 	~HOx

  A$B=	~h=F
  DEFINE A%	B<A$B(E)>
 B<A$B(E)>
 !` 	oHOp
  ..TM1=	oh=0
	pIFB <H>,<
    IFB <B>,<
	p(      ..WD1==..WD	pH1+1
      IFG <.	ph.WD1-F>,<PRINTX 	q?Sublevel overflo	q(wed top for A.B	qH>
      ..BT1==0	qh
      IFE <..WD	r1-F>,<
        	r(IFG <..BT1-E>,<P	rHRINTX ?Sublevel o	rhverflowed top bit	ss for A.B>
   	s(    >;end IFE <..	sHWD1-F>
      ..	shTM1==1
     >;en	td IFB,<B>
   >;	t(end IFB,<H>

 	tH IFE ..TM1,<
   	th ..CT1==1
    ..	uSZ1==^D36
    IF	u(NB <I>,<..CT1==	uHI>
    IFNB <H>	uh,<..SZ1==H>

 	v   REPEAT ..CT1,<	v(
      ..BT1==..	vHBT1+..SZ1
      	vhIFG <..BT1-^D35>,	w<
	..WD1==..WD1+	w(1
	IFG <..WD1-F	wH>,<PRINTX ?Sub le	whvel overflows top	x for A.B>
	..B	x(T1==..SZ1-1
	IFE	xH <..WD1-F>,<
	 	xh IFG <..BT1-E>,<	yPRINTX ?Sub level	y( overflows top bi	yHts for A.B>
	 	yh>;end IFE <..WD1-	zF>
       >;end	z( IFG <..BT1-^D35>	zH

      IFNB <	zhB>,<
	IFE ..TM1,	{<
	  $$$$ B,\..	{(BT1,\..SZ1,\..WD1	{H
	  ..RX==10
	 	{h RADIX ^D10
	  D	|EFSTR (A.B,A$	|(B(G),\..BT1,\..S	|HZ1)
	  RADIX ..R	|hX
	 >;end IFE ..	}TM1
	..TM1==..TM	}(1+1
       >;end	}H  IFNB <B>
    	}h >;end REPEAT ..C	~T1
   >;end IFE ..TM1
 nd IFE 
u1A 
S@P &\zP$N^ 	HP


	CAIA
		hJRST	e
	LOAD	.S
AC,C,D
IFNB <
(B>,<
	SKIPA	B,
H.SAC
>;end IFNB 
h<B>
IFB <B>,<

	SKIPA	.SAC
>;
(end IFB <B>
e:
IFB <B>
e:N^	w 
hP
IRP A,<

DEFINE SKPA (A
(C,Y,STR) <
.SKP 
H(A,AC,Y,STR)
>;
hend DEFINE SKPA
>;end IRP A
>}{woP