:Title[LJUMP];
*
* Edit History
* January 26, 1984 7:00 PM, JonL, opNOP and NEXTOP from LOPS
* January 4, 1984 6:40 PM, JonL, Moved in TL.NOP and TL.DECTSP2
* November 5, 1982 9:21 AM, Masinter
KnowRBase[LTEMP0];
TOPLEVEL;
InsSet[LispInsSet, 1];
*--------------------------------------------------------------------
opJUMP:* 1 or 2 byte jump
*--------------------------------------------------------------------
NextOpcode;
set[dx, 0];
repeat[20,
IFUjmp[add[200, dx], 1, ifuBR, 0, opJUMP, add[dx, 2]]
set[dx, add[dx,1]]];
IFUjmp[260, 2, ifuBR, 0, opJUMP, 1];* signed long jump
*--------------------------------------------------------------------
opFJUMP: * jump if NIL and pop
*--------------------------------------------------------------------
TSP← (fetch← TSP) - 1, flipMemBase;
T← Md, TSP← (fetch← TSP) - 1;
LEFT← (LEFT) + 1;
pd← T or Md;
branch[.+2, alu#0], T← Id - (PCX’) - 1;
NextOpcode;* take branch
PCF← T, Branch[TL.NOP];
set[dx, 0];
repeat[20,
IFUjmp[add[220, dx], 1, StackM2BR, 0, opFJUMP, add[dx, 2]]
set[dx, add[dx,1]]];
IFUjmp[262, 2, StackM2BR, 0, opFJUMP, 1];
*--------------------------------------------------------------------
opTJUMP: * jump if not NIL and pop
*--------------------------------------------------------------------
TSP← (fetch← TSP) - 1, flipMemBase;
T← Md, TSP← (fetch← TSP) - 1;
LEFT← (LEFT) + 1;
pd← T or Md;
branch[.+2, alu=0], T← Id - (PCX’) - 1;
NextOpcode;* take branch
PCF← T, branch[TL.NOP];
set[dx, 0];
repeat[20,
IFUjmp[add[240, dx], 1, StackM2BR, 0, opTJUMP, add[dx, 2]]
set[dx, add[dx,1]]];
IFUjmp[263, 2, StackM2BR, 0, opTJUMP, 1];
*--------------------------------------------------------------------
opNFJUMPX:* jump if NIL, pop if no jump
*--------------------------------------------------------------------
T← (fetch← TSP) - 1, flipMemBase;
LTEMP0← Md, fetch← T;
LEFT← (LEFT) + 1;
pd← (LTEMP0) or Md;
branch[.+2, alu#0], T← Id - (PCX’) - 1;
LEFT← (LEFT) - 1, NextOpcode;* take branch
PCF← T;
TL.DECTSP2: * after PCF←, normally
TSP← (TSP) - (2c), Branch[opNOP];
IFUjmp[264, 2, StackM2BR, 0, opNFJUMPX, 1];
*--------------------------------------------------------------------
opNTJUMPX:* jump if not NIL and pop
*--------------------------------------------------------------------
T← (fetch← TSP) - 1, flipMemBase;
LTEMP0← Md, fetch← T;
LEFT← (LEFT) + 1;
pd← (LTEMP0) or Md;
branch[.+2, alu=0], T← Id - (PCX’) - 1;
LEFT← (LEFT) - 1, NextOpcode;* take branch
PCF← T, branch[TL.DECTSP2];
IFUjmp[265, 2, StackM2BR, 0, opNTJUMPX, 1];
*--------------------------------------------------------------------
opJUMPXX:* Long jump, relative to byte 0
*--------------------------------------------------------------------
T← Id;
T← lsh [T, 10];
T← Id + T;
T← T - (PCX’) - 1;
PCF← T, branch[TL.NOP];
TL.NOP: * after PCF←, normally
nop, Branch[opNOP];
IFUpause[261, 3, ifuBR, 0, opJUMPXX, noNData, 0, 0];
*--------------------------------------------------------------------
opNOP:
*--------------------------------------------------------------------
NextOpcode;
regOP1[376, ifuBR, opNOP, noNData];
:if[Debugging];
*--------------------------------------------------------------------
SUBROUTINE;NEXTOP: GLOBAL, * Debugging checks after each opcode
*--------------------------------------------------------------------
RBase← RBase[PSTATE];
KnowRBase[LTEMP0];
PSTATE← (PSTATE) and not (PS.PCXBAD);
branch[.+2, alu#0], LTEMP1← Link;
ifuJump[0];
TOP LEVEL;
uCodeCheck[PSTATEbitsAtEndOfOp];
:endif;