{File name LoadStore.mc
Description: Mesa Load and Store op-codes
Author: JGS    
Created: February 16, 1980
JPM  20-Feb-87  9:10:32  Bug fix in SGDB (L1 ← L1.None instead of L1.Pop).
AHL/JPM 6-Jan-87 12:02:35 MDS relief changes.
AHL  28-Feb-86 20:12:21  Fix SLDe to do the right thing.
JPM, 11-Sep-84 13:42:42, Fix BRANCH mask after XWtOKDisp; fix allocation errors.
DEG,  1-Sep-84 19:39:12, Add copyright notice.
JPM,  9-May-84 13:19:57, Replaced XDirtyDisp by XWtOKDisp
AXD, 15-Jun-83 18:01:14, New instruction set.
CRF, 29-Apr-83 16:31:38, Changed L1.PushDec2 to L1.Push in SGDB to handle PC correctly on page faults
JGS, November 10, 1981  11:27 AM,  New Instruction Set
RXG, April 1, 1980  12:20 PM}

{ 	Copyright (C) 1980, 1981, 1983, 1984 by Xerox Corporation.  All rights reserved.}
{
LIn	Load Immediate n = 0-10
LIB	Load Immediate Byte
LIHB	Load Immediate High Byte
LINB	Load Immediate Negative Byte
LIW	Load Immediate Word
LIN1	Load Immediate Negative One
LINI	Load Immediate Negative Infinity
LID0	Load Immediate Double Zero

LLn	Load Local n = 0-11
LLB	Load Local Byte
LLDn	Load Local Double n = 0-8,10
LLDB	Load Local Double Byte

PLn	Put Local n = 0-3
PLB	Put Local Byte
PLD0	Put Local Double Zero
PLDB	Put Local Double Byte

SLn	Store Local n = 0-10
SLB	Store Local Byte
SLDn	Store Local Double n = 0-6,8
SLDB	Store Local Double Byte

LAn	Local Address n = 0-3,6,8
LAB	Local Address Byte
LAW	Local Address Word

LGn	Load Global n = 0-2
LGB	Load Global Byte
LGDn	Load Global Double n = 0,2
LGDB	Load Global Double Byte

SGB	Store Global Byte
SGDB	Store Global Double Byte

GAn	Global Address n = 0-1
GAB	Global Address Byte
GAW	Global Address Word

LGA0	Long Global Address 0
LGAB	Long Global Address Byte
LGAW	Long Global Address Word
DESC	Descriptor

LP	Lengthen Pointer
}

{Times for memory operations are + 2 if page cross + 2 if fix map flags} 

{L2	LSMap}
MacroDef[LSr, at[#1,10,LSRtn]];
Set[L2.LL,  1]; Set[L2.LLx, Or[L2.LL, 2]];
Set[L2.LLD, 5]; Set[L2.LLDx, Or[L2.LLD, 2]];
Set[L2.SL,  0];
Set[L2.SLD, 9]; Set[L2.SLDx, Or[L2.SLD, 2]];
Set[L2.PLD, 0D];
Set[L2.SLDn, 4];
MacroDef[LSGr, at[#1,10,LSGRtn]];
Set[L2.LG,  1]; Set[L2.LGx, Or[L2.LG, 2]];
Set[L2.LGD, 5]; Set[L2.LGDx, Or[L2.LGD, 2]];
Set[L2.SG,  0];
Set[L2.SGD, 0E];

{*****************************************************************************
	LIn Load Immediate n, n = 0-10   1 click
*****************************************************************************}
@LI0:	T ← 0, push, GOTO[LIn],					c1, opcode[300'b];
@LI1:	T ← 1, push, GOTO[LIn],					c1, opcode[301'b];
@LI2:	T ← 2, push, GOTO[LIn],					c1, opcode[302'b];
@LI3:	T ← 3, push, GOTO[LIn],					c1, opcode[303'b];
@LI4:	T ← 4, push, GOTO[LIn],					c1, opcode[304'b];
@LI5:	T ← 5, push, GOTO[LIn],					c1, opcode[305'b];
@LI6:	T ← 6, push, GOTO[LIn],					c1, opcode[306'b];
@LI7:	T ← 7, push, GOTO[LIn],					c1, opcode[307'b];
@LI8:	T ← 8, push, GOTO[LIn],					c1, opcode[310'b];
@LI9:	T ← 9, push, GOTO[LIn],					c1, opcode[311'b];
@LI10:	T ← 0A, push, GOTO[LIn],				c1, opcode[312'b];

LIn:	STK ← TOS, PC ← PC + PC16, IBDisp,				c2, at[0,10,LIn];
PushT:	TOS ← T, push, fZpop, DISPNI[OpTable],				c3;


{*****************************************************************************
	LIB Load Immediate Byte   1 click
*****************************************************************************}
@LIB:	T ← ib, push,						c1, opcode[315'b];
	STK ← TOS, PC ← PC + 1, IBDisp, GOTO[PushT],			c2;


{*****************************************************************************
	LIHB Load Immediate High Byte    1 click
*****************************************************************************}
@LIHB:	T ← ib, push,						c1, opcode[320'b];
	STK ← TOS, PC ← PC + 1, push, fZpop, IBDisp,			c2;
	TOS ← T LRot8, DISPNI[OpTable],					c3;


{*****************************************************************************
	LINB Load Immediate Negative Byte   1 click
*****************************************************************************}
@LINB:	Q ← ib, push,						c1, opcode[317'b];
	STK ← TOS, PC ← PC + 1, push, fZpop, IBDisp,			c2;
	TOS ← Q xor ~0FF, DISPNI[OpTable],				c3;


{*****************************************************************************
	LIW Load Immediate Word    2 clicks
*****************************************************************************}
@LIW:	T ← ib, push, L0 ← 0,					c1, opcode[316'b];
LIWx:	PC ← PC + 1,							c2;
LIWa:	T ← T LRot8, L0Disp,						c3;

	T ← T or ib, DISP4[LIn],					c1;


{*****************************************************************************
	LIN1 Load Immediate Negative One   1 click
*****************************************************************************}
@LIN1:	T ← T xor ~T, push, GOTO[LIn],				c1, opcode[313'b];


{*****************************************************************************
	LINI Load Immediate Negative Infinity   1 click
*****************************************************************************}
@LINI:	T ← RShift1 0, SE ← 1, push, GOTO[LIn],			c1, opcode[314'b];


{*****************************************************************************
	LID0 Load Immediate Double Zero   1 click
*****************************************************************************}
@LID0:	push,							c1, opcode[321'b];
	STK ← TOS, PC ← PC + PC16, push, IBDisp,			c2;
	STK ← TOS ← 0, push, fZpop, DISPNI[OpTable],			c3;


{*****************************************************************************
	LLn Load Local n, n = 0-11   1 click
*****************************************************************************}
@LL0:	MAR ← Q ← [rhL, L+0], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[1'b];
@LL1:	MAR ← Q ← [rhL, L+1], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[2'b];
@LL2:	MAR ← Q ← [rhL, L+2], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[3'b];
@LL3:	MAR ← Q ← [rhL, L+3], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[4'b];
@LL4:	MAR ← Q ← [rhL, L+4], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[5'b];
@LL5:	MAR ← Q ← [rhL, L+5], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[6'b];
@LL6:	MAR ← Q ← [rhL, L+6], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[7'b];
@LL7:	MAR ← Q ← [rhL, L+7], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[10'b];
@LL8:	MAR ← Q ← [rhL, L+8], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[11'b];
@LL9:	MAR ← Q ← [rhL, L+9], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[12'b];
@LL10:	MAR ← Q ← [rhL, L+0A], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[13'b];
@LL11:	MAR ← Q ← [rhL, L+0B], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[14'b];

LLn:	STK ← TOS, PC ← PC + PC16, IBDisp, L2←L2.LL, BRANCH[LLa,LLb,1],	c2;
LLa:	TOS ← MD, push, fZpop, DISPNI[OpTable],				c3;
LLb:	Rx ← UvL, GOTO[LSMap],						c3;


{*****************************************************************************
	LLB Load Local Byte   1 click
*****************************************************************************}
@LLB:	MAR ← Q ← [rhL, L+ib], L1←L1.PopDec2, push,		c1, opcode[15'b];
	STK ← TOS, PC ← PC + 1, IBDisp, L2←L2.LL, BRANCH[LLa,LLb,1],	c2;


{*****************************************************************************
	LLDn Load Local Double n, n = 0-8,10  2 clicks
*****************************************************************************}
@LLD0:	MAR ← Q ← [rhL, L + 0], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[16'b];
@LLD1:	MAR ← Q ← [rhL, L + 1], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[17'b];
@LLD2:	MAR ← Q ← [rhL, L + 2], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[20'b];
@LLD3:	MAR ← Q ← [rhL, L + 3], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[21'b];
@LLD4:	MAR ← Q ← [rhL, L + 4], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[22'b];
@LLD5:	MAR ← Q ← [rhL, L + 5], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[23'b];
@LLD6:	MAR ← Q ← [rhL, L + 6], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[24'b];
@LLD7:	MAR ← Q ← [rhL, L + 7], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[25'b];
@LLD8:	MAR ← Q ← [rhL, L + 8], push, L1←L1.Pop2Dec, GOTO[LLDn], c1, opcode[26'b];
@LLD10:	MAR ← Q ← [rhL, L + 0A], push, L1←L1.Pop2Dec,GOTO[LLDn], c1, opcode[27'b];

LLDn:	STK ← TOS, PC ← PC + PC16, push, L2←L2.LLD, BRANCH[LLDa, LLDb,1],	c2;
LLDa:	T ← MD, GOTO[LLD2],						c3;
LLDb:	Rx ← UvL, GOTO[LSMap],						c3;

LLD2:	MAR ← Q ← [rhL, Q + 1],						c1;
	STK ← T, IBDisp, L2←L2.LL, BRANCH[LLa,LLb,1],			c2;


{*****************************************************************************
	LLDB Load Local Double Byte  2 clicks
*****************************************************************************}
@LLDB:	MAR ← Q ← [rhL, L + ib], push, L1←L1.Pop2Dec2,		c1, opcode[30'b];
	STK ← TOS, PC ← PC + 1, push, L2←L2.LLD, BRANCH[LLDa, LLDb,1],	c2;


{*****************************************************************************
	PLn Put Local n, n = 0-3    1 click
*****************************************************************************}
{no page carry possible on local 0-3}

@PL0:	MAR ← Q ← [rhL, L+0], fXpop, push, GOTO[PLn],		c1, opcode[55'b];
@PL1:	MAR ← Q ← [rhL, L+1], fXpop, push, GOTO[PLn],		c1, opcode[56'b];
@PL2:	MAR ← Q ← [rhL, L+2], fXpop, push, GOTO[PLn],		c1, opcode[57'b];
@PL3:	MAR ← Q ← [rhL, L+3], fXpop, push, GOTO[PLn],		c1, opcode[60'b];

PLn:	MDR ← TOS, PC ← PC + PC16, IBDisp, CANCELBR[PLa,0],		c2;


{*****************************************************************************
	PLB Put Local Byte    1 click
*****************************************************************************}
@PLB:	MAR ← Q ← [rhL, L+ib], L1 ← L1.PopDec2, push,		c1, opcode[61'b];
PLBx:	STK ← MDR ← TOS, PC ← PC + 1, IBDisp, fXpop, fZpop, BRANCH[PLa,PLb,1],	c2;
PLa:	DISPNI[OpTable],						c3;
PLb:	Rx ← UvL, L2←L2.SL, push, GOTO[LSMap],				c3;


{*****************************************************************************
	PLD0 Put Local Double Zero  2 clicks
*****************************************************************************}
@PLD0:	MAR ← Q ← [rhL, L + 0], fXpop, fZpop, push,		c1, opcode[62'b];
	MDR ← STK,							c2;
	GOTO[@PL1],							c3;


{*****************************************************************************
	PLDB Put Local Double Byte    2 clicks
*****************************************************************************}
@PLDB:	MAR ← Q ← [rhL, L + ib], L1←L1.None,			c1, opcode[63'b];
	MDR ← STK, fXpop, fZpop, push, BRANCH[PLDBa, PLDBb,1],		c2;
PLDBa:	GOTO[PLDB2],							c3;
PLDBb:	Rx ← UvL, L2←L2.PLD, push, GOTO[PLBc],				c3;

PLDB2:	MAR ← Q ← [rhL, Q + 1], push, L1←L1.PopDec2, GOTO[PLBx],	c1;

PLBc:	STK ← T ← TOS, pop, GOTO[LSMapx],				c1;


{*****************************************************************************
	SLn Store Local n, n = 0-10    1 click
*****************************************************************************}
@SL0:	MAR ← Q ← [rhL, L+0], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[31'b];
@SL1:	MAR ← Q ← [rhL, L+1], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[32'b];
@SL2:	MAR ← Q ← [rhL, L+2], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[33'b];
@SL3:	MAR ← Q ← [rhL, L+3], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[34'b];
@SL4:	MAR ← Q ← [rhL, L+4], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[35'b];
@SL5:	MAR ← Q ← [rhL, L+5], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[36'b];
@SL6:	MAR ← Q ← [rhL, L+6], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[37'b];
@SL7:	MAR ← Q ← [rhL, L+7], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[40'b];
@SL8:	MAR ← Q ← [rhL, L+8], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[41'b];
@SL9:	MAR ← Q ← [rhL, L+9], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[42'b];
@SL10:	MAR ← Q ← [rhL, L+0A], L1←L1.Dec, push, GOTO[SLn],	c1, opcode[43'b];

SLn:	MDR ← STK ← TOS, PC ← PC + PC16, pop, IBDisp, BRANCH[SLa,SLb,1],	c2;
SLa:	TOS ← STK, pop, DISPNI[OpTable],				c3;
SLb:	Rx ← UvL, L2←L2.SL, GOTO[LSMap],				c3;


{*****************************************************************************
	SLB Store Local Byte    1 click
*****************************************************************************}
@SLB:	MAR ← Q ← [rhL, L+ib], L1 ← L1.Dec2, push,		c1, opcode[44'b];
SLBx:	MDR ← STK ← TOS, PC ← PC + 1, pop, IBDisp, BRANCH[SLa,SLb,1],	c2;


{*****************************************************************************
	SLDn Store Local Double n, n = 0-6,8  2 clicks
*****************************************************************************}
@SLD0:	MAR ← Q ← [rhL, L + 0], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[45'b];
@SLD1:	MAR ← Q ← [rhL, L + 1], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[46'b];
@SLD2:	MAR ← Q ← [rhL, L + 2], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[47'b];
@SLD3:	MAR ← Q ← [rhL, L + 3], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[50'b];
@SLD4:	MAR ← Q ← [rhL, L + 4], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[51'b];
@SLD5:	MAR ← Q ← [rhL, L + 5], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[52'b];
@SLD6:	MAR ← Q ← [rhL, L + 6], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[53'b];
@SLD8:	MAR ← Q ← [rhL, L + 8], L1←L1.PushInc, GOTO[SLDn],	c1, opcode[54'b];

SLDn:	MDR ← TT ← STK, push, BRANCH[SLDa,SLDb,1],			c2;
SLDa:	STK ← TOS, PC ← PC + PC16, L1←L1.PushDec, GOTO[SLDc],		c3;
SLDb:	Rx ← UvL, L2←L2.SLDn, GOTO[SLDe],				c3;

SLDc:	MAR ← Q ← [rhL, Q + 1], pop,					c1;
SLDd:	MDR ← TOS, pop, IBDisp, BRANCH[SLa,SLb,1],			c2;

SLDe:	T ← STK ← TOS, GOTO[LSMapx],					c1;

{*****************************************************************************
	SLDB Store Local Double Byte    2 clicks
*****************************************************************************}
@SLDB:	MAR ← Q ← [rhL, L + ib], L1←L1.Push,			c1, opcode[165'b];
	MDR ← STK, push, L2←L2.SLD, BRANCH[SLDBa, SLDBb,1],		c2;
SLDBa:	PC ← PC + 1, STK ← TOS, L1←L1.PushDec2, GOTO[SLDBc],		c3;
SLDBb:	Rx ← UvL, GOTO[LSMap],						c3;

SLDBc:	MAR ← Q ← [rhL, Q + 1], pop, GOTO[SLDd],			c1;


{*****************************************************************************
	LAn Local Address n, n = 0-3,6,8    2 clicks
*****************************************************************************}
@LA0:	T ← UvL, push, GOTO[LIn],				c1, opcode[322'b];
@LA1:	T ← 1, push, L0 ← 1, GOTO[LAa],				c1, opcode[323'b];
@LA2:	T ← 2, push, L0 ← 1, GOTO[LAa],				c1, opcode[324'b];
@LA3:	T ← 3, push, L0 ← 1, GOTO[LAa],				c1, opcode[325'b];
@LA6:	T ← 6, push, L0 ← 1, GOTO[LAa],				c1, opcode[326'b];
@LA8:	T ← 8, push, L0 ← 1, GOTO[LAa],				c1, opcode[327'b];
LAa:	STK ← TOS, PC ← PC + PC16,					c2, at[1,10,LIn];
LAb:	L0Disp,								c3;

	BRANCH[LAc,GAb,1],						c1;


{*****************************************************************************
	LAB Local Address Byte    2 clicks
*****************************************************************************}
@LAB:	T ← ib, push, L0 ← 1,					c1, opcode[330'b];
	STK ← TOS, PC ← PC + 1, GOTO[LAb],				c2;


{*****************************************************************************
	LAW Local Address Word    3 clicks
*****************************************************************************}
@LAW:	T ← ib, push, L0 ← 1,					c1, opcode[331'b];
	PC ← PC + 1, GOTO[LIWa],					c2;
LAc:	TOS ← UvL, IBDisp,						c2;
PushTOSplusT:
	TOS ← TOS + T, push, fZpop, DISPNI[OpTable],			c3;


{*****************************************************************************
	LGn Load Global n, n=0-2   1 click
*****************************************************************************}
{no page carry possible on global 0-2}

@LG0:	MAR ← Q ← [rhG, G+0], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[64'b];
@LG1:	MAR ← Q ← [rhG, G+1], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[65'b];
@LG2:	MAR ← Q ← [rhG, G+2], L1←L1.PopDec, push, GOTO[LLn],	c1, opcode[66'b];


{*****************************************************************************
	LGB Load Global Byte   1 click
*****************************************************************************}
@LGB:	MAR ← Q ← [rhG, G+ib], L1←L1.PopDec2, push,		c1, opcode[67'b];
	STK ← TOS, PC ← PC + 1, IBDisp, L2←L2.LG, BRANCH[LGa,LGb,1],	c2;
LGa:	TOS ← MD, push, fZpop, DISPNI[OpTable],				c3;
LGb:	TT ← UvG, GOTO[LSGMap],						c3;


{*****************************************************************************
	LGDn Load Global Double n, n = 0,2  2 clicks
*****************************************************************************}
@LGD0:	MAR ← Q ← [rhG, G + 0], push, L1←L1.Pop2Dec, GOTO[LGDn], c1, opcode[70'b];
@LGD2:	MAR ← Q ← [rhG, G + 2], push, L1←L1.Pop2Dec, GOTO[LGDn], c1, opcode[71'b];
LGDn:	STK ← TOS, PC ← PC + PC16, push, BRANCH[LGDa,LGDb,1],		c2;


{*****************************************************************************
	LGDB Load Global Double Byte  2 clicks
*****************************************************************************}
@LGDB:	MAR ← Q ← [rhG, G + ib], push, L1←L1.Pop2Dec2,		c1, opcode[72'b];
	STK ← TOS, PC ← PC + 1, push, L2←L2.LGD, BRANCH[LGDa,LGDb,1],	c2;
LGDa:	T ← MD, GOTO[LGD2],						c3;
LGDb:	TT ← UvG, GOTO[LSGMap],						c3;

LGD2:	MAR ← Q ← [rhG, Q + 1],						c1;
	STK ← T, IBDisp, L2←L2.LG, BRANCH[LGa,LGb,1],			c2;


{*****************************************************************************
	SGB Store Global Byte    2 clicks
*****************************************************************************}
@SGB:	rhTT ← UvGhigh, push,					c1, opcode[73'b];
	Xbus ← rhG, XWtOKDisp, L2 ← L2.SG,				c2;
	TT ← UvG, BRANCH[SGa,SGb,0D],					c3;

SGa:	Map ← [rhTT, TT], L1 ← L1.Pop,					c1;
SGe:	Q ← G + ib,							c2;
	STK ← TOS, rhG ← MD, GOTO[LSGMap],				c3;

SGb:	MAR ← Q ← [rhG, G + ib], L1 ← L1.Pop,				c1;
	MDR ← STK ← TOS, PC ← PC + 1, pop, IBDisp, BRANCH[SGc,SGd,1],	c2;
SGc:	TOS ← STK, pop, DISPNI[OpTable],				c3;
SGd:	PC ← PC - 1, push, GOTO[LSGMap],				c3;


{*****************************************************************************
	SGDB Store Global Double Byte    3 clicks
*****************************************************************************}
@SGDB:	rhTT ← UvGhigh, push,					c1, opcode[166'b];
	Xbus ← rhG, XWtOKDisp, L1 ← L1.None,				c2;
	TT ← UvG, BRANCH[SGDa,SGDb,0D],					c3;

SGDa:	Map ← [rhTT, TT], L2 ← L2.SGD, GOTO[SGe],			c1;

SGDb:	MAR ← Q ← [rhG, G + ib + 1], L2 ← L2.SGD,			c1;
	MDR ← STK ← TOS, pop, BRANCH[SGDd,SGDc,1],			c2;
SGDc:	Q ← Q - 1, push, GOTO[LSGMap],					c3;
SGDd:	T ← STK,							c3;

	MAR ← [rhG, Q - 1], GOTO[WDLb],					c1;


{*****************************************************************************
	GAn Global Address n, n = 0-1    1 clicks
*****************************************************************************}
@GA0:	T ← UvG, push, GOTO[LIn],				c1, opcode[332'b];
@GA1:	T ← 1, push, L0 ← 3,					c1, opcode[333'b];
	STK ← TOS, PC ← PC + PC16, GOTO[LAb],				c2, at[3,10,LIn];


{*****************************************************************************
	GAB Global Address Byte    2 clicks
*****************************************************************************}
@GAB:	T ← ib, push, L0 ← 3,					c1, opcode[334'b];
	STK ← TOS, PC ← PC + 1, GOTO[LAb],				c2;


{*****************************************************************************
	GAW Global Address Word    3 clicks
*****************************************************************************}
@GAW:	T ← ib, push, L0 ← 3,					c1, opcode[335'b];
	PC ← PC + 1, GOTO[LIWa],					c2;
GAb:	TOS ← UvG, IBDisp, GOTO[PushTOSplusT],				c2;


{*****************************************************************************
	LGA0 Long Global Address Zero    1 clicks
*****************************************************************************}
@LGA0:	T ← 0, push,						c1, opcode[372'b];
	STK ← TOS, PC ← PC + PC16, push, GOTO[LGAa],			c2;


{*****************************************************************************
	LGAB Long Global Address Byte    2 clicks
*****************************************************************************}
@LGAB:	T ← ib, push,						c1, opcode[373'b];
	STK ← TOS, PC ← PC + 1, push,					c2, at[2,10,LIn];
LGAa:	TT ← UvG,							c3;

	TT ← TT + T, push, fZpop,					c1;
	STK ← TT, IBDisp,						c2;
	TOS ← UvGhigh, DISPNI[OpTable],					c3;


{*****************************************************************************
	LGAW Long Global Address Word    3 clicks
*****************************************************************************}
@LGAW:	T ← ib, push, L0 ← 2,					c1, opcode[374'b];
	PC ← PC + PC16, GOTO[LIWa],					c2;


{*****************************************************************************
	DESC Descriptor    3 clicks
*****************************************************************************}
@DESC:	T ← uGFI, push,						c1, opcode[375'b];
	STK ← TOS,							c2;
	TOS ← T or 3, GOTO[@LIW],					c3;


{*****************************************************************************
	LP Lengthen Pointer	1 click
*****************************************************************************}
@LP:	[] ← TOS, ZeroBr, push,					c1, opcode[367'b];
	STK ← TOS, PC ← PC + PC16, IBDisp, push, BRANCH[LPnot, LPnil],	c2;
LPnot:	TOS ← UvMDS, pop, DISPNI[OpTable],				c3;
LPnil:	TOS ← 0, pop, DISPNI[OpTable],					c3;


{*****************************************************************************
	Load/Store Carry Logic
*****************************************************************************}
LSMap:	T ← TOS, {for SLD and SGD}					c1;
LSMapx:	Q ← Q - Rx, L2Disp,						c2;
	Q ← Q and 0FF, RET[LSRtn],					c3;

LLMap:	Map ← Q ← [rhMDS, Rx+Q], GOTO[LIPe],			c1, LSr[L2.LLx];

LDMap:	Map ← Q ← [rhMDS, Rx+Q], pop, GOTO[RDMpc2],		c1, LSr[L2.LLDx];

SLMap:	Map ← Q ← [rhMDS, Rx+Q],				c1, LSr[L2.SL];
	T ← TOS, L0←L0.W, GOTO[WMpc3],					c2;

SDMap:	Map ← Q ← [rhMDS, Rx+Q], pop, GOTO[WDMpc2],		c1, LSr[L2.SLDx];

SDnMap:	Map ← Q ← [rhMDS, Rx+Q], pop, L0←L0.WD,			c1, LSr[L2.SLDn];
	PC ← PC - PC16, pop, GOTO[WDMpc3],				c2;

PDMap:	Map ← Q ← [rhMDS, Rx+Q],				c1, LSr[L2.PLD];
	TT ← STK, push, L0←L0.WD, GOTO[WDMpc3],				c2;

LSGMap:	Q ← Q - TT,							c1;
	Q ← Q and 0FF, L2Disp,						c2;
	TT ← TT + Q, rhTT ← UvGhigh, RET[LSGRtn],			c3;

{LGMap:}
	Map ← Q ← [rhTT, TT],						c1, LSGr[L2.LGx];
	GOTO[RLMpc3],							c2;

LGDMap:	Map ← Q ← [rhTT, TT], pop,					c1, LSGr[L2.LGDx];
	GOTO[RDLMc3],							c2;

SGMap:	Map ← Q ← [rhTT, TT], GOTO[WLMpc2],				c1, LSGr[L2.SG];
SGDMap:	Map ← Q ← [rhTT, TT], GOTO[WDLMc2],				c1, LSGr[L2.SGD];


	{ E N D }