DragonOpSum.tioga
December 19, 1984 9:46:53 am PST
Last Edited by Curry - Save Using - Copy /INDIGO/Dragon/Documentation/ ← DragonOpSum.tioga
Conditional Jumps
JEBB -J JBB--3-2-1 Jump = Byte Byte IF [S ] = A: THEN PC ← PC + B:s +EZ S←S-1
JNEBB-J JBB--3-2-1 Jump # Byte Byte IF [S ] # A: THEN PC ← PC + B:s -EZ S←S-1
RJEB -J RJB--3-2-1 Reg Jump = Byte IF [S|S-1] = Rb THEN PC ← PC + B:s +EZ S|S-1|S-2
RJNEB-J RJB--3-2-1 Reg Jump # Byte IF [S|S-1] # Rb THEN PC ← PC + B:s -EZ S|S-1|S-2
RJLB -J RJB--3-2-1 Reg Jump < Byte IF [S|S-1] < Rb THEN PC ← PC + B:s +LZ S|S-1|S-2
RJGEB-J RJB--3-2-1 Reg Jump >= Byte IF [S|S-1] >= Rb THEN PC ← PC + B:s -LZ S|S-1|S-2
RJLEB-J RJB--3-2-1 Reg Jump <= Byte IF [S|S-1] <= Rb THEN PC ← PC + B:s +LE S|S-1|S-2
RJGB -J RJB--3-2-1 Reg Jump > Byte IF [S|S-1] > Rb THEN PC ← PC + B:s -LE S|S-1|S-2
Unconditional Jumps
J1 OI---1-1-1 Jump PC+1 PC ← PC + 1
J2 OB---2-1-1 Jump PC+2 PC ← PC + 2
J3 ODB--3-1-1 Jump PC+3 PC ← PC + 3
J5 OQB--5-1-1 Jump PC+5 PC ← PC + 5
JB OB---2-1-1 Jump Byte PC ← PC + A:s
JDB ODB--3-1-1 Jump Double Byte PC ← PC + B:A:s
DJ OQB--5-1-1 Direct Jump PC ← D:G:B:A:
SJ OI---1-1-1 Stack Jump PC ← PC + [S] S←S-1
Returns
RET OB---2-1-1 Return Pop(PC, L) S←L+A:
RETK OB---2-1-1 Return from kernal Pop(PC, L) after doing SPR IFUStatus S←L+A:
RETN OI---1-1-1 Return No Adjst Pop(PC, L)
RETT OI---1-1-1 Return From Trap Pop(PC, L)
Calls
Trap ------32-1 Trap Push PC PC←TrapLoc
XOP1 ----1----1 Direct Call Push PC+1 PC←xop[OP] [S]𡤍:G:B:A: * S←S+1*
XOP2 ----2----1 Direct Call Push PC+2 PC←xop[OP] [S]𡤍:G:B:A: * S←S+1*
XOP3 ----3----1 Direct Call Push PC+3 PC←xop[OP] [S]𡤍:G:B:A: * S←S+1*
XOP5 ----5----1 Direct Call Push PC+5 PC←xop[OP] [S]𡤍:G:B:A: * S←S+1*
KFC OI---1-1-1 Kernal Call Push PC+1 PC←xop[OP] [S]←IFUStatus * S←S+1
LFC ODB--3-1-1 Local Call Push PC+3 PC←PC+B:A:s *
DFC OQB--5-1-1 Direct Call Push PC+5 PC𡤍:G:B:A: *
SFC OI---1-1-3 Stack Call Push PC+1 PC←[S] * S←S-1
SFCI OI---1-1-3 Stk Call Indirect Push PC+1 PC←[S]^ * *
Read
PIN OB---2-1-1 PBus Fetch [ S ] ← ([ S ] )^A:
In OB---2-1-1 Input [ S ] ← ([ S ] + B:A:)^I/O *
RB OB---2-1-1 Read Byte [ S ] ← ([ S ] + A: )^ *
RSB OB---2-1-1 Read Save Byte [ S+1 ] ← ([ S ] + A: )^ * S←S+1*
LRIn LRB-2-16-1 Load Reg Indrct n [ S+1 ] ← ([ L+n ] + A: )^ * S←S+1*
LGF ODB--3-1-1 Load Global Frame [ S+1 ] ← ([Ax+gb ] + B:A:)^ * S←S+1*
RAI LRRB-3-1-1 Read Aux Reg Indrct [ L+B:l] ← ([Ax+B:r] + A: )^ *
RRI LRRB-3-1-1 Read Reg Indrct [ L+B:l] ← ([ L+B:r] + A: )^ *
CST
old=[S+1] tst=[S] A=[S-1] new=[S-2]
CST CST--2-1-5 Conditional STore IF old𡤊^H=tst THEN A^←new ELSE[]𡤊^ *|EZ S←S+1*
Write
POUT OB---2-1-1 PBus Store ([ S ] )^A: ← [ S-1 ] S←S-2
Out OB---2-1-1 Ouput ([ S ] + B:A:)^I/O ← [ S-1 ] * S←S-2
WB OB---2-1-1 Writ Byte ([ S ] + A: )^ ← [ S-1 ] * S←S-2
WSB OB---2-1-1 Writ Swapped Byte ([ S-1 ] + A: )^ ← [ S ] * S←S-2
PSB OB---2-1-1 Put Swapped Byte ([ S-1 ] + A: )^ ← [ S ] * S←S-1
SRIn LRB-2-16-1 Stor Reg Indrct n ([ L+n ] + A: )^ ← [ S ] * S←S-1
WRI LRRB-3-1-1 Writ Reg Indrct ([ L+B:l] + A: )^ ← [ L+B:r] *
WAI LRRB-3-1-1 Writ Aux Reg Indrct ([Ax+B:l] + A: )^ ← [ L+B:r] *
Index fiddling instructions
DIS OI---1-1-1 DIScard S ← S - 1 No data moves S←S-1
EP (ALS) OB---2-1-1 Enter Procedure L ← (S + A:) MOD StackSize
AL OB---2-1-1 Add to L L ← (L + A:) MOD StackSize
AS OB---2-1-1 Add to Stack S ← (S + A:) MOD StackSize S←S+A:
ASL OB---2-1-1 Add to Stack from L S ← (L + A:) MOD StackSize S←L+A:
Stack Load Store
LIB OB---2-1-1 Load Im Byte [ S+1 ] ← A: S←S+1*
LIDB ODB--3-1-1 Load Im Dbl Byte [ S+1 ] ← B:A: S←S+1*
LIQB OQB--5-1-1 Load Im Quad Byte [ S+1 ] ← D:G:B:A: S←S+1*
LRn LR--1-16-1 Load from LOC n [ S+1 ] ← [ L+n ] S←S+1*
SRn LR--1-16-1 Store to LOC n [ L+n ] ← [ S ] S←S-1
LIP OB---2-1-1 Load Internal Proc [ S+1 ] ← [ A: ] S←S+1*
SIP OB---2-1-1 Store Internal Proc [ A: ] ← [ S ] S←S-1
LCn OI---1-8-1 Load from CON n [ S+1 ] ← [CON+n ] S←S+1*
DUP OI---1-1-1 DUPlicate [ S+1 ] ← [ S ] S←S+1*
EXDIS OI---1-1-1 EXCHange discard [ S-1 ] ← [ S ] S←S-1
EXCH OI---1-1-2 EXCHange [ S-1 ] ← [ S ] [S]←[S-1] NO Bypass
Arithmetic Immediate Ops
ADDB OB---2-1-1 Add Byte [S] ← [S] + A: *+OF
SUBB OB---2-1-1 Sub Byte [S] ← [S] - A: *+OF
ADDDB ODB--3-1-1 Add Double Byte [S] ← [S] + B:A: *+OF
SUBDB ODB--3-1-1 Sub Double Byte [S] ← [S] - B:A: *+OF
Arithmetic Logical Stack Ops
ADD OI---1-1-1 Stack signed ADD [S-1] ← [S-1] + [S] + C C ← 0 *+OF S←S-1
SUB OI---1-1-1 Stack signed SUB [S-1] ← [S-1] - [S] - C C ← 0 *+OF S←S-1
LADD OI---1-1-1 Stack Lisp ADD [S-1] ← [S-1] + [S] C ← 0 *+IL S←S-1
LSUB OI---1-1-1 Stack Lisp SUB [S-1] ← [S-1] - [S] C ← 0 *+IL S←S-1
OR OI---1-1-1 Stack OR [S-1] ← [S-1] Or [S] S←S-1
AND OI---1-1-1 Stack AND [S-1] ← [S-1] And[S] S←S-1
RX OI---1-1-1 Stack Read indeXed [S-1] ← ([S-1] + [S])^ * S←S-1
BC OI---1-1-1 Stack BoundsCheck [S-1]<0 ([S-1] - [S])>=0 => *+BC S←S-1
Arithmetic Logical Quick Ops
ADD R1---2-1-1 Quick signed ADD [S] ← [S] + Rb + C C ← 0 *+OF
SUB R1---2-1-1 Quick signed SUB [S] ← [S] - Rb - C C ← 0 *+OF
LADD R1---2-1-1 Quick Lisp ADD [S] ← [S] + Rb C ← 0 *+IL
LSUB R1---2-1-1 Quick Lisp SUB [S] ← [S] - Rb C ← 0 *+IL
OR R1---2-1-1 Quick OR [S] ← [S] OR Rb
AND R1---2-1-1 Quick AND [S] ← [S] AND Rb
RX R1---2-1-1 Quick Read indeXed [S] ← ([S] + Rb)^ *
BC R1---2-1-1 Quick BoundsCheck [S]<0 ([S] - Rb)>=0 => *+BC
Arithmetic Logical Field Register Ops
RADD RR---3-1-1 Reg signed ADD Rc ← Ra + Rb + C C ← 0 *+OF RRStk*
RSUB RR---3-1-1 Reg signed SUB Rc ← Ra - Rb - C C ← 0 *+OF RRStk*
RLADD RR---3-1-1 Reg Lisp ADD Rc ← Ra + Rb C ← 0 *+IL RRStk*
RLSUB RR---3-1-1 Reg Lisp SUB Rc ← Ra - Rb C ← 0 *+IL RRStk*
ROR RR---3-1-1 Reg OR Rc ← Ra OR Rb RRStk*
RAND RR---3-1-1 Reg AND Rc ← Ra AND Rb RRStk*
RRX RR---3-1-1 Reg Read indeXed Rc ← (Ra + Rb)^ * RRStk*
RBC RR---3-1-1 Reg Bounds Check Ra<0 (Ra - Rb)>=0 *+BC RRStk*
RVSUB RR---3-1-1 Reg Vanilla SUB Rc ← Ra - Rb RRStk*
RVADD RR---3-1-1 Reg Vanilla ADD Rc ← Ra + Rb RRStk*
RUADD RR---3-1-1 Reg Unsigned ADD Rc ← Ra + Rb + C C ← COut RRStk*
RUSUB RR---3-1-1 Reg Unsigned SUB Rc ← Ra - Rb - C C ←~COut RRStk*
RXOR RR---3-1-1 Reg XOR Rc ← Ra XOR Rb RRStk*
RFU RR---3-1-1 Reg Field Unit Rc ← Ra FU Rb FUop𡤏ield RRStk*
Field, Multiply, Divide and Floating Point
FSDB ODB--3-1-1 Field Set Dbl Byte [ field ] ← [S] + B:A: S←S-1
SHL ODB--3-1-1 Left Shift [S ] ← [S ] FU 0 FUop𡤋:A:
SHR ODB--3-1-1 Right Shift Extract [S ] ← [S ] FU [S] FUop𡤋:A:
SHD ODB--3-1-1 Double Shift [S-1] ← [S-1] FU [S] FUop𡤋:A: S←S-1
UDIV OI---1-1-1 Unsigned Division QtntRem=[S-2][S-1] ← [S-2][S-1]/[S] *+OF S←S-1
SMUL OI---1-1-1 Signed Multiply DblProd=[S-1][S ] ← [S-1]*[S]
SFP OB---2-1-1 Store Floating Pt [fpxAarg] ← [stack] FPStk*
FLIP ODB--3-1-1 FP Internal result [fpxAarg] ← [fpxAarg] op [stack] * FPStk*
FLOP ODB--3-1-1 FP Stack result [stack] ← [fpxAarg] op [stack] * FPStk*
Map
0000 0 : OI 1 Byte x x x x x x x x
0000 1 : OI 1 Byte x x x x x x x x
0001 0 : OI 1 Byte x x x x x x x x
0001 1 : OI 1 Byte x x x x x x x x
0010 0 : OQB 5 Bytes x x x x x x x x
0010 1 : --- 5 Bytes x x x x x x x x
0011 0 : --- 5 Bytes x DFC LIQB x x x J5 DJ
0011 1 : --- 5 Bytes x x x x x x x x
0100 0 : RR0 1 Byte OR AND RX BC ADD SUB LADD LSUB
0100 1 : OI 1 Byte DUP DIS EXCH EXDIS SFC SFCI RETN x
0101 0 : OI 1 Byte x SMUL UDIV x KFC x J1 SJ
0101 1 : OI 1 Byte LC0 LC1 LC2 LC3 LC4 LC5 LC6 LC7
0110 0 : LR 1 Byte LR0 LR1 LR2 LR3 LR4 LR5 LR6 LR7
0110 1 : LR 1 Byte LR8 LR9 LR10 LR11 LR12 LR13 LR14 LR15
0111 0 : LR 1 Byte SR0 SR1 SR2 SR3 SR4 SR5 SR6 SR7
0111 1 : LR 1 Byte SR8 SR9 SR10 SR11 SR12 SR13 SR14 SR15
1000 0 : RR1 2 Bytes QOR QAND QRX QBC QADD QSUB QLADD QLSUB
1000 1 : OB 2 Bytes EP AL ASL AS CST x RET RETK
1001 0 : OB 2 Bytes LIP SIP LIB SFP ADDB SUBB J2 JB
1001 1 : OB 2 Bytes RB WB RSB WSB PIN POUT x PSB
1010 0 : LRB 2 Bytes LRI0 LRI1 LRI2 LRI3 LRI4 LRI5 LRI6 LRI7
1010 1 : LRB 2 Bytes LRI8 LRI9 LRI10 LRI11 LRI12 LRI13 LRI14 LRI15
1011 0 : LRB 2 Bytes SRI0 SRI1 SRI2 SRI3 SRI4 SRI5 SRI6 SRI7
1011 1 : LRB 2 Bytes SRI8 SRI9 SRI10 SRI11 SRI12 SRI13 SRI14 SRI15
1100 0 : RR3 3 Bytes ROR RAND RRX RBC RADD RSUB RLADD RLSUB
1100 1 : RR3 3 Bytes RXOR *** RFU *** RVADD RVSUB RUADD RUSUB
1101 0 : ODB 3 Bytes LGF LFC LIDB x ADDDB SUBDB J3 JDB
1101 1 : ODB 3 Bytes RAI WAI RRI WRI IN OUT x x
1110 0 : RJB 3 Bytes *** RJEB RJLB RJLEB *** RJNEB RJGEB RJGB
1110 1 : RJB 3 Bytes *** RJNEBJ RJGEBJ RJGBJ *** RJEBJ RJLBJ RJLEBJ
1111 0 : JBB 3 Bytes JEBB JNEBB JEBBJ JNEBBJ x x x x
1111 1 : ODB 3 Bytes SHL SHR SHD FSDB FLIP FLOP x x
x => XOP
*** => Not defined as XOP => Undefined behavior