Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/ki10a1.mac
There are no other files named ki10a1.mac in the archive.
SUBTTL	SIMULATOR PARAMETERS AND DEFINITIONS

	MLON

;*ACCUMULATOR DEFINITIONS

	F==0		;MISC LOGIC FLIP FLOPS
	T==1		;TEMPORARY REGISTERS
	T1==2
	T2==3
	T3==4
	S==5		;STATE REGISTER
	AR==6		;MACHINE REGISTERS
	MQ==7
	BR==10
	AD==11
	MB==12
	PC==13
	MA==14
	SC==15
	IR==16
	P==17		;PUSH DOWN POINTER
	DEFINE	BITS (FIRST,PREFIX,LIST)<
	.FOO.==FIRST
	IRP LIST<
	PREFIX'LIST==.FOO.
	.FOO.==.FOO.+.FOO.
>>

;*LEFT HALF BITS
;*CLOCKS
	BITS (2,,<PCCLK>)
;*EXECUTION TIME PULSE SWITCHES
	BITS (1,ET,<0,1>)
	INFTST==4
;*AD ENABLES
	BITS (10,AD,<MAGIC,ARRP,ARLP,ARMI,BRRP,BRLP,BRMI
,FMRP,FMLP,FMMI,CR36,ADD,EQV,PL1L,MI1B>)
	ADFMPL==ADFMRP+ADFMLP
	ADARPL==ADARRP+ADARLP
	ADBRPL==ADBRRP+ADBRLP
	ADPL1B==ADPL1L+ADCR36

;*RIGHT HALF BITS
;*FETCH AND STORE SWITCHES
	BITS (1,,<FCE,PSE,FCCACR,SCE,STORE
,SACINH,SACBR,SAC2,PCCHNG>)
	FCEPSE==FCE+PSE
	FCE2==PSE
	FCCACL==FCCACR+PSE
	SAIAC0==SACINH+SACBR
;*MQ ENABLES
	BITS (1,MQ,<SHR2,SHRT,SHLT,ADEN,CLR>)
;*AUX AR ENABLES
	BITS (.FOO.,AR,<SHR2,SHRT,SHLT,CLR>)
;*BR ENABLES
	BRAREN==1000
;*AR ENABLES
	BITS (2000,AR,<LTAD,RTAD,RARL,LARR,IREN>)
	ARFLGS==ARLTAD+ARLARR
	ARPCEN==ARRTAD+ARRARL
	ARADEN==ARLTAD+ARRTAD
	ARSWAP==ARRARL+ARLARR
;*ADDRESS BUS ENABLES
	BITS (.FOO.,AB,<PCEN,ABEN,ADEN>)

	LNGCYC==40000
	ADCLKINH==1
;*CONTROL FF'S
	BITS (ABPCEN,AB,<PC,AB,AD>)
	CLKINH==1
	ABAS==2
	DSF2SET==4
	DSF2CLR==10
	FLAG1==20
	FLAG2==40
	FLAG3==100
	SCP1S==200
	SCP1IN==400
	MUOF1S==1000
	MUOF1C==2000
	MUOF2S==4000
	MUOF2C==10000


;*SCADDER BITS RIGHT HALF
	SAMI22==1
	SAPL44==2
	SAZERO==3
	SAP220==4
	SAP110==5
	SAM110==6
	SAMI42==7
	SAMI16==10
	SAMI33==11
	SAMI32==12
	SAMI4==13
	SAPL10==14
	SAMI43==15
	SAPL43==16
	SAM100==17
	BITS (20,SA,<SCPL,SCMI,ADD,PL1,MSIZ,ARPOS,AREX,EQV,FEEN>)
	BITS (.FOO.,SC,<SAEN,AREN,SHRT,SCP1>)
	BITS (.FOO.,FE,<SAEN>)

;*LEFT HALF
	BITS (1,MB,<FMEN,AREN>)
	BITS (.FOO.,BR,<ARXEN>)
	BITS (.FOO.,ARX,<SR2,SHR,SHL,ADX,CLR>)
	BITS (.FOO.,AD,<MSKG,BRP2,MBRE,MBLE>)
	ADMBEN==ADMBRE+ADMBLE

;*ADX BITS LEFT HALF
	BITS (.FOO.,ADX,<BRM,FM2,FMM,FMP,EQV,ADD>)

	MEMREF=FCE!FCEPSE!SCE!FCCACL!FCCACR!FCE2

	PAGDLY==^D100
	WARNDLY==^D350

	IFNDEF	SIMASB,<
	OFFSET==400000	;SIMULATED PROGRAMS ARE IN HIGH SEGMENT>


;*FLAGS, LEFT HALF OF PC WORD

	AROV==400000
	CRY0==200000
	CRY1==100000
	FOV==040000
	BIS==020000
	USERF==010000
	EXIOT==004000
	LIP==002000
	UOLIP==001000
	TN0==400
	TN1==200
	FXU==000100
	DCK==000040
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		0-37

TABLE:

;*FORMAT OF DISPATCH TABLE
;*	FETCH CYCLE ENABLES, SWITCHES
;*	ET0 ADDRESS,, ET1 ADDRESS
;*	ET2 ENABLES AND CLOCKS, ET2 DISPATCH

;*UUO'S
DEFINE UUOMAC <
	XWD ET0+ET1,STORE+SACINH
	XWD [MONUUO],[XWD ADARPL,0]
	XWD 0,ARIREN+ARRTAD
>
	IFNDEF	SIMASB,<
;*ILLEGAL UUO							0
	UUOMAC

;*USER UUO'S							1-37
	REPEAT 37,
<	XWD ET0+ET1+ADMAGIC,STORE+SACINH+UUOFD
	[XWD ADMAGIC,ARIREN+ABADEN+UUO1]
	XWD INFTST,0
>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		40-107

;*MONITOR UUO'S							40-77
	REPEAT 40,
<	UUOMAC
>
;*UNDEFINED OP CODES						100-107
	REPEAT 10,
<	UUOMAC
>
>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		110-111

;*DFAD, DFSB							110-111
	REPEAT 2,
<	XWD ET0+ET1+ADFMPL,FCE2+SAC2+DFAFD+PCCHNG
	XWD [XWD ADFMPL,ARADEN+BRAREN+DFA0],[XWD ADBRPL,ARADEN+BRAREN+DFA1]
	ARADEN+BRAREN+DFA2
>
;*DFMP								112
	XWD	ET0+ET1+ADFMPL,FCE2+SAC2+DFMFD+PCCHNG
	XWD [XWD ADFMPL,ARADEN+BRAREN+DFM0],[XWD ADBRPL,ARADEN+DFM1]
	ARADEN+BRAREN+DFM2
;*DFDV								113
	XWD	ET0+ET1+ADFMPL,FCE2+SAC2+DFDFD+PCCHNG+SACBR
	XWD [XWD ADFMPL,ARADEN+BRAREN+DFD0],[ARADEN+DFD1]
	DFD2

SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		114-123

;*UNDEFINED OP CODES						114-117
	REPEAT 4,
<	UUOMAC
>

;*DMOVE,DMOVN							120-121
	REPEAT 2,
<	SAC2+FCE2+PCCHNG+SRINST
	0
	DMOV2
>
;*FIX								122
	XWD	ET0+ET1,FCE+FIXFD
	XWD	[FIX0],[FIX1]
	FIX2

;*UNDEFINED OP CODE						123
	UUOMAC

SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		124-132

;*DMOVEM								124
	XWD	ADFMPL,SCE+SACINH+PCCHNG
	0
	ARADEN+BRAREN

;*DMOVNM								125
	XWD	ADFMMI+ET0+ET1,SCE+SACINH+PCCHNG+DMVMFD
	XWD	[XWD ADADD+ADCR36+ADARPL+ADMAGIC,ARADEN+BRAREN+DMVNM0],
[XWD ADFMMI+ADCR36+ADADD,DMVNM1]
	DMVNM2

;*FIXR								126
	XWD	ET0+ET1,FCE+FIXFD
	XWD	[FIX0],[FIX1]
	FIX2

;*FLTR								127
	FCE+FLTFD
	0
	XWD	ADARPL,FLT2

;*UFA								130
	XWD	ADFMPL,FCE+FADFD
	0
	BRAREN+ARADEN+UFA2

;*DFN								131
	XWD	ET0+ET1+ADARPL,FCEPSE+SACBR+LNGCYC+DFNFD
	XWD	[XWD ADFMMI,DFN0],[BRAREN+ARADEN+DFN1]
	BRAREN+ARADEN

;*FSC								132
	XWD	ET0+ADFMPL,FSCFD
	XWD	[ARADEN+FSC0],0
	XWD	ADARPL,FSC2

SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		133-137

;*IBP								133
	BLOCK 3

;*XLDB SECOND PART						134-135
	REPEAT 2,
<	XWD ET0+ET1,FCE+LDBFD
	XWD [LDB0],[XWD ADARPL+ADBRPL,BRAREN+LDB1]
	ARADEN+LDB2
>

;*XDPB SECOND PART						136-137
	REPEAT 2,
<	XWD ADFMPL+ET0+ET1,FCE+SCE+SACINH+DPBFD
	XWD [BRAREN+DPB0],[XWD ADARPL+ADBRPL,BRAREN+DPB1]
	ARADEN+DPB2
>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		140-177

;*FADXX								140-147
	N==0
	REPEAT 10,
<	XWD <IFE N-5,<ET0>>+ADFMPL,<IFN N-5,<FCE>>+FADFD
+<IFN N&2,<SCE>>+<IFE N&3-2,<SACINH>>+<IFE N-1,<SAC2>>
	XWD [XWD ADFMPL,ARSWAP+FMP0],0
	BRAREN+ARADEN+FAD2
	N==N+1
>

;*FSBXX								150-157
	N==0
	REPEAT 10,
<	XWD <IFE N-5,<ET0>>+ADARMI+ADCR36+ADADD+ADMAGIC
+ET1,<IFN N-5,<FCE>>+FSBFD+<IFN N&2,<SCE>>+<IFE N&3-2,<SACINH>>
+<IFE N-1,<SAC2>>
	XWD [XWD ADARMI+ADCR36+ADADD+ADMAGIC,ARSWAP],
[XWD ADFMPL,ARADEN+FMP0]
	BRAREN+ARADEN+FAD2
	N==N+1
>

;*FMPXX								160-167
	N==0
	REPEAT 10,
<	XWD <IFE N-5,<ET0>>+ET1+ADFMPL,<IFN N-5,<FCE>>+FMPFD
+<IFN N&2,<SCE>>+<IFE N&3-2,<SACINH>>+<IFE N-1,<SAC2>>
	XWD [XWD ADFMPL,ARSWAP+FMP0],[ARADEN+BRAREN+FMP1]
	XWD ADARPL,FMP2
	N==N+1
>

;*FDVXX								170-177
	N==0
	REPEAT 10,
<	XWD ET1+ADFMPL+<IFE N-5,<ET0>>,<IFE N-1,<SAC2>>+<IFN N-5,<FCE>>+FDVFD
+<IFN N&2,<SCE>>+<IFE N&3-2,<SACINH>>
	XWD [XWD ADFMPL,ARSWAP+FMP0],[BRAREN+ARADEN+<IFE N-1,<-1>>+FDV1]
	FDV2+<IFE N-1,<-FDV2+FDV2L>>
	N==N+1
>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		200-237

;*MOVES, ALIAS FWT						200-217
	N=0
	REPEAT 20,
<	XWD <IFE N&3-2,<ET0>>+
<IFN N&10,<IFN N&3-2,<ADCR36+ADARMI+ADADD+
ADFMMI>>>+ADFMPL,<IFE N&3,<FCE>>+<IFE N&3-3,<FCEPSE+SAIAC0>>
+<IFE N&3-2,<SCE+SACINH>>
	XWD [XWD <IFN N&10,<ADADD+ADMAGIC+ADCR36+ADARMI>>,ARADEN],0
	<IFE N&14-4,<ARSWAP>>+<IFE N&14-10,<ARADEN+ADSUB>>+<IFE N&14-14,<FWT>>
	N=N+1
>

DEFINE SWCHES
	<XWD ET0+ET1+ADFMPL,<IFN N&3-1,<FCE>>+<IFN N&2,<SCE>>
+<IFE N&3-2,<SACINH>>+<IFN N&4,<IFN N&3-2,<SAC2>>>>

;*MULTIPLIES							220-227
	N=0
	REPEAT 10,
<	SWCHES+LNGCYC+MULFD
	XWD [BRAREN+MUL0],[<IFE N&4,<IMUL1>>+<IFN N&4,<MUL1>>]
	<IFE N&4,<IMUL2>>+<IFN N&4,<MUL2>>
	N=N+1
>

;*DIVIDES							230-237
	N=0
	REPEAT 10,
<	SWCHES!<IFN N&3-2,<SAC2>>+DIVFD
	XWD [BRAREN+<IFN N&4,<ARADEN+DIV0>>+<IFE N&4,<ARADEN+IDIV0>>]
,[<IFN N&4,<DIV1>>+<IFE N&4,<IDIV1>>]
	XWD ADARPL+ADADD,<IFN N&4,<DIV2>>+<IFE N&4,<IDIV2>>
	N=N+1
>

SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		240-247

;*ASH, ROT, LSH							240-241-242
	A0==<ADFMPL+ET0+ET1>B17+SRINST

	REPEAT 3,
<	A0
	XWD [ARADEN+BRAREN+SSHFT0],[SHFT1]
	SSHFT2
>

;*JFFO								243
	XWD ADFMPL+ET0+ET1,PCCHNG+LNGCYC+JFFOFD
	XWD [XWD ADBRPL,ARADEN+BRAREN+JFFO0],[XWD ADARPL,ABPCEN+JFFO1]
	XWD INFTST,JFFO2

;*ASHC, ROTC, LSHC						244-245-246
	REPEAT 3,
<	A0+SAC2
	XWD [ARADEN+BRAREN+DSHFT0],[XWD ADFMPL,SHFT1]
	DSHFT2
>

;*UNDEFINED OP CODE						247
	UUOMAC

SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		250-257

;*EXCH								250
	XWD ADFMPL,FCEPSE+SACBR
	0
	BRAREN+ARADEN

;*BLT								251
	XWD ADARMI+ADFMPL+ADPL1L+ADADD+ET0+ET1,PCCHNG+BLTFD
	XWD [ARADEN+BLT0],[XWD ADADD+ADFMPL,ARRARL+BLT1]
	XWD ADARPL+PCCLK,ARPCEN+BRAREN+BLT2

;*AOBJX								252-253
	N=0
	REPEAT 2,
<	XWD ADFMPL+ADPL1B+ADADD,PCCHNG+LNGCYC+AOBJD
	0
	XWD ADBRPL,BRAREN+ARADEN+AOBJX+N
	N=1
>

;*JRST								254
	XWD 0,SACINH+PCCHNG+JRSTFD
	0
	ARPCEN+JRST1

;*JFCL								255
	XWD 0,SACINH+PCCHNG+JFCLFD
	0
	XWD	0,JFCL1

;*XCT								256
	XWD	INFTST,PCCHNG+SACINH+XCTFD
	0
	XCT2

;*MAP								257
	XWD	0,SCE+PCCHNG
	0
	ABPCEN+MAP2
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		260-267

	A0==<ADFMPL+ADPL1B+ADADD>B17+PUSHD
	A1==A0+<ET0+ET1>B17+SACBR+STORE
	A2==ARADEN+BRAREN
	A3==<ADBRPL>B17

;*PUSHJ								260
		A1
	XWD	[A2+PUSHES],[A3+ABADEN]
	XWD	PCCLK,ABPCEN+ARFLGS+ARPCEN+BRAREN+PUSHJ1

;*PUSH								261
		A1+FCE+ABADEN
	XWD	[A2+PUSH1],[A3]
		ARADEN+BRAREN+PUSH2

	A0==FCCACRT+<ADFMPL+ADMI1B+ADADD>B17
	A1==BRAREN+ARADEN+POPS+<ADBRPL>B17

;*POP								262
		A0+SCE+SACBR+<ET0>B17
	XWD	[A1],0
		BRAREN+ARADEN

;*POPJ								263
		A0+PCCHNG
		0
		A1+ABADEN

;*JSR								264
		PCCHNG+SCE+SACINH
		0
	XWD 	PCCLK,ARPCEN+ARFLGS+ABPCEN+PCINCL

;*JSP								265
	XWD	0,PCCHNG
		0
	XWD	ADBRPL,ARPCEN+ARFLGS+BRAREN

;*JSA								266
	XWD	ADARPL+ET0,SACBR+SCE+PCCHNG+ABADEN
	XWD	[XWD ADFMPL+PCCLK,ARLARR+ARPCEN+ABPCEN+PCINCL],0
	XWD	INFTST,BRAREN+ARADEN

;*JRA								267
	XWD	ADBRPL,FCCACL+PCCHNG+ABADEN
	0
	XWD	INFTST,0
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		270-377

;*ADD-SUBTRACT							 270-277

	N=0
	REPEAT 10,
<	XWD ADADD+ADFMPL+<IFE N&4,<ADARPL>>+<IFN N&4
,<ADARMI+ADCR36>>,<IFE N&3,<FCE>>+<IFN N&2,<FCEPSE>>+
<IFE N&3-2,<SACINH>>
	0
	ARADEN+ADSUB
	N=N+1
>

;*COMPARES, JUMPS AND SKIPS					300-377

	N=0
	REPEAT 20,
<	XWD ADFMPL+ADARMI+ADCR36+ADADD+ET0,SKPFD+ABPCEN+SACINH+
PCCHNG+<IFN N&10,<FCE>>
	XWD	[ADCLKINH,,0],0
	XWD 0,COMP
	N=N+1
>

	REPEAT 60,
<	<<ET0>B17>+PCCHNG+<IFN N&70-40,<SKPFD>>+<IFE N&10,<<ADFMPL>B17>>+<IFN N&10,<ABPCEN+SAIAC0
+<IFE N&70-30,<FCE>>+<IFE N&50-50,<FCEPSE>>+<ADARPL>B17>>
+<IFN N&40,<<ADADD>B17>>+<IFE N&70-50,<<ADCR36+ADMAGIC>B17>>
+<IFE N&70-40,<<ADCR36>B17+AOJD>>
	[ADCLKINH,,0],,0
	IFN N&10,<XWD 0,ARADEN+SKIPS>
	IFE N&10,<XWD ADBRPL,ARADEN+BRAREN+JUMPS>
	N=N+1
>

SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		400-477

;*BOOLEAN GROUP							400-477

DEFINE CMP (X,LIST,ANS)
<	ANS==0
	IRP LIST <IFE <X&74>-<LIST*4>,<STOPI
	ANS==1>>>

	N=0
	REPEAT 100,
<	CMP (N,<0,5,12,17>,M)
	CMP (N,<7,13,15,16>,A6)
	CMP (N,<6,11>,A1)
	CMP (N,<1,2,3,6,11,15,16>,A2)
	CMP (N,<4,7,10,13,14>,A3)
	CMP (N,<1,4,5,11,13,16>,A4)
	CMP (N,<2,6,7,10,12,15>,A5)
	BFLGS==A1*ADEQV+A2*ADARPL+A3*ADARMI+A4*ADFMPL+A5*ADFMMI
	XWD BFLGS+A6*ET0,<IFE <N&3>,<<1-M>*FCE>>+<IFN <<N&2>*<1-M>>,<FCEPSE>>+
<IFE N&3-2,<SACINH>>+<IFN N&2,<M*SCE>>+<IFE <N&74>,<BOOL0D>>
	XWD [XWD ADARMI,ARADEN],0
	ARADEN
	N=N+1
>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		500-577

;*HALF WORDS							500-577
	N=0
	REPEAT 100,
<	M=0
	IFE N&33-2,<M=FCEPSE>
	IFE N&3-3,<M=FCEPSE+SAIAC0>
	XWD <IFE N&3-2,<ADFMPL+ET0>>+<IFE N&72-40,<ADFMLP>>+<IFE N&72,
<ADFMRP>>+<IFN N&3-2,<<IFE <N&44>*<N-43>*<N-47>,<ADARLP>>+
<IFE <N&44-40>*<N-3>*<N-7>,<ADARRP>>>>,<IFE N&3,<FCE>>+M+
<IFE N&3-2,<SACINH+<IFN N&30,<SCE>>>>
	XWD [XWD <IFE N&70-40,<ADBRLP>>+<IFE N&70,<ADBRRP>>+
<IFE N&44-40,<ADARRP>>+<IFE N&44,<ADARLP>>,ARADEN+BRAREN],0
	<IFE N&44-44,<ARRARL>>+<IFE N&44-4,<ARLARR>>+<IFE N&44,
<ARLTAD>>+<IFE N&44-40,<ARRTAD>>+<IFE N&50-40,<ARLTAD>>+
<IFE N&50,<ARRTAD>>+<IFE N&30-30,<HWTETS+<IFN <N&4*10+N>&40,<2>>>>
	N=N+1>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		600-777

;*TEST GROUP							600-677

	N=0
	REPEAT 100,
<	M=0
	IFN N&6,<M=1>
	IFE N&60-60,<M=1>
	A1=0
	IFE N&66-20,<A1=1>
	IFE N&66-40,<A1=1>
	A0=ADFMPL+M*ADARPL+<IFE N&66-40,<ADEQV>>+A1*ADARMI
	XWD <IFN N&1,<ET0>>+M*ET1+A0,<IFN N&10,<FCE>>+<IFE N&60,<SACINH>>
+<IFN N&6,<PCCHNG+ABPCEN>>+<IFE N&3-2,<LNGCYC>>
	XWD [XWD A0,ARSWAP+<IFN N&2,<TEST1>>],
[XWD <IFE N&60-20,<ADARMI+ADFMPL>>+<IFE N&60-40,
<ADEQV+ADFMPL+ADARMI>>+<IFE N&60-60,<ADBRMI+ADFMMI+ADEQV
+ADARPL+ADARMI>>+<IFE N&6-4,<PCCLK>>
,BRAREN+<IFN N&2,<TEST+<IFN N&4,<1>>>>]
	XWD	<IFN N&6,<INFTST>>,ARADEN
	N=N+1
>

	IFNDEF	SIMASB,<
;*IOTS								700-
	BLOCK	300

IFN TABLE+3000-.,<PRINTX TABLE LENGTH INCORRECT>
>
SUBTTL	DISPATCH TABLE FOR INSTRUCTIONS		TWO PART INST'S

BPINC:
	N=3
	REPEAT 5,
<	XWD ADADD+<IFN N&5-5,<ET0+ADARPL+ADCR36+ADBRMI
+ADBRPL+ADMI1B>>,SACINH+<IFN N&4,<PCCHNG>>+<IFN N&5-5,<FCEPSE
+LNGCYC+BPIFD>>+<IFE N&5-5,<FCE+BPNIFD>>
	XWD [XWD ADADD,BYTE0],0
	BYTE2+<IFE N&4,<2>>
	N=N+1
>

BPNINC:
	XWD ADADD,SACINH+BPNI2D		;IBP (BYF6(1))
	0
	BYTE2+2

	REPEAT 4,
<	XWD ADADD,FCE+SACINH+PCCHNG+BPNIFD
	0
	BYTE2
>

DMVPT2:	XWD ADARPL+ADADD+ADCR36+ADMAGIC+ET0+ET1,STORE+SACINH+DMVEFD
	XWD [DMVE0A],[XWD ADFMPL,0]
	ARADEN

	XWD ADARPL+ADADD+ADCR36+ADMAGIC+ET0+ET1,STORE+SACINH+DMVEFD
	XWD [XWD ADADD+ADCR36+ADARPL+ADMAGIC,DMVE0A],[XWD ADFMMI+ADADD+ADCR36,DMVN1A]
	ARADEN+DMVN2A

	IFNDEF	SIMASB,<
MUUO2:	XWD ET0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OS	PCP1G
	POPJ	P,

CONDZ1:	MOVE	T1,PC
	LSH	T1,-11
	AND	T1,IR
	SETZM	CONDZ#
	TLNE	T1,740
	SETOM	CONDZ
	POPJ	P,

JFCL2:	TLNE	IR,(1B9)
	TLZ	PC,AROV
	TLNE	IR,(1B10)
	TLZ	PC,CRY0
	TLNE	IR,(1B11)
	TLZ	PC,CRY1
	TLNE	IR,(1B12)
	TLZ	PC,FOV
	SKIPN	CONDZ
	TLO	T,INFTST
	POPJ	P,

JFCLF:	PUSHJ	P,CONDZ1
	SKIPN	CONDZ
	TROA	T,ABPCEN
	TLO	T,INFTST
	POPJ	P,

JRSTF:	TLNE	IR,(1B10+1B11)
	JRST	.+3
	TLO	T,INFTST
	POPJ	P,
	SETOM	STINH
	POPJ	P,
JRST2:	TLO	T,ADBRPL
	TRO	T,BRAREN
	TLNN	IR,(1B10+1B11)
	POPJ	P,
	TLNE	IR,(1B10)
	SETZM	RUN#
	TLNN	IR,(1B11)
	JRST	JRST3
	HLLZ	T1,AR
	TLNE	PC,USERF		;USER MODE
	TLOA	T1,10000		;USER CANNOT LEAVE USER MODE
	JRST	.+3
	TLNN	PC,EXIOT
	TLZ	T1,4000			;USER CANNOT TURN ON USER IOT
	TLZ	T1,37
	HLL	PC,T1
	SETZM	BYF6
	TLNE	PC,BIS
	SETOM	BYF6
JRST3:	MOVEI	S,ST1
	POPJ	P,

	IFNDEF	SIMASB,<
MUOXC3:	MOVEM	17,MONTMP+17	;SAVE AC'S
	MOVEI	17,MONTMP
	BLT	17,MONTMP+16
	HRRI	PC,.+3		;SET ACTUAL FLAGS
	HLL	PC,USR425
	JRST	2,(PC)
	MOVE	0,USR424
	LSH	0,-^D27
	CAIN	0,041
	JRST	MUOXC5		;INIT UUO
	MOVSI	17,ACS		;GET SIMULATED AC'S
	BLT	17,17
	XCT	USR424		;EXECUTE MONITOR UUO
	SKIPA
MUOXC4:	AOS	USR425
	MOVEM	17,ACS+17	;PUT BACK SIM AC'S
	MOVEI	17,ACS
	BLT	17,ACS+16
	JSP	0,.+1		;GET ACTUAL FLAGS
	HLLM	0,USR425	;SETUP AS SIM FLAGS
	MOVEI	0,0
	CALL	[SIXBIT /SETUWP/]
	JFCL
	MOVSI	17,MONTMP
	BLT	17,17		;RESTORE AC'S
	POPJ	P,
MUOXC5:	MOVE	0,@USR425	;MUUO INIT EXECUTION
	MOVEM	0,MUOXC6	;SETUP ARG'S
	AOS	USR425
	MOVE	0,@USR425
	MOVEM	0,MUOXC6+1
	MOVSI	17,ACS		;GET SIMULATED AC'S
	BLT	17,17
	XCT	USR424		;EXECUTE INIT
MUOXC6:	0
	0
	SKIPA			;ERROR RETURN
	AOS	USR425		;NORMAL RETURN
	JRST	MUOXC4

MONTMP:	BLOCK	20
>
DMVEA:	TLNE	F,ADBRPL
	TRO	T,ARADEN
	POPJ	P,

DIVF:	TRO	T2,SAMI42
	TLC	T,ADFMPL+ADFMMI
	SETOM	STINH
	POPJ	P,

BPNIF:	TLO	T2,ADMSKG	;BYTE PTR NOT INC FETCH
BPNIF2:	TRO	T2,SAARPOS
	POPJ	P,

FIXF:	PUSHJ	P,FSCF
	JRST	FMP0A
FLTF:	PUSHJ	P,FSCF
	TRO	T2,SAMI4
	POPJ	P,

FSCF:	SETOM	STINH
	POPJ	P,

FDVF:	PUSHJ	P,FSCF
	JRST	FMP0A

LDBF:	TRO	T2,SASCMI+SAPL1+SAADD+SAZERO
	JUMPGE	SC,CPOPJ
	TRO	T2,SAM100
	POPJ	P,

DFMF:	PUSHJ	P,DFLTF
	JRST	FMP0A

DFLTF:	TLOA	T2,ARXCLR
BLTF:	PUSHJ	P,BLTFDA
	SETOM	STINH
	POPJ	P,

BLTFDA:	SETOM	PCP1FF
	JRST	DFDF+2

DFDF:	PUSHJ	P,DFLTF
	TDO	T2,[XWD ADXFMM+ADXEQV,SAAREX]
	SETOM	TNCLRI#
	POPJ	P,

UUOF:	SETOM	TNCLRI
	SETOM	XCTF#
	MOVEI	T1,40
	MOVEM	T1,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