Appendix A P-Code Instruction Tables

The following tables provide a complete list of one-byte and extended p-code instructions. Each instruction is represented by a specific hexadecimal number. For example, LDCW2 is in the row marked “60” and the column marked “1” or “9.” Thus, it has a value of 61 hexadecimal. LDCW5 is in the same column but one row down, so it has a value of 69 hexadecimal.

The syntax for p-code instruction names is described in Chapter 3, “Reducing Program Size with P-Code.” The p-code opcodes are fully described in the Help file PCODE.HLP.

Table A.1 One-Byte Instructions

  0 1 2 3 4 5 6 7
  8 9 A B C D E F
0 NOP LdfWb LdfWw IncfWwb IncfWbb IncgWbb LdfW16 LdfW15
8 LdfW14 LdfW13 LdfW12 LdfW11 LdfW10 LdfW9 LdfW8 LdfW7
10 LdfW6 LdfW5 LdfW4 LdfW3 LdfW2 LdfW1 LdfW0 LdfAb
18 LdfAw LdfA9 LdfA8 LdfA7 LdfA6 LdfA5 LdfA4 LdfA3
20 LdfA2 LdfA1 LdfA0 StfWb StfWw StfpWb StfW13 StfW12
28 StfW11 StfW10 StfW9 StfW8 StfW7 StfW6 StfW5 StfW4
30 StfW3 StfW2 StfW1 StfW0 IncfWb IncfW8 IncfW7 IncfW6
38 IncfW5 IncfW4 IncfW3 IncfW2 IncfW1 IncfW0 LdgWb LdgW0
40 LdgW1 LdgW2 LdgW3 LdgW4 LdgW5 LdgW6 LdgW7 LdgW8
48 LdgW9 LdgW10 LdgW11 LdgW12 LdgW13 StfpLb ClrfBb LdgAb
50 LdgA0 LdgA1 LdgA2 LdgA3 LdgA4 LdinWb LdinW0 LdinW1
58 LdinW2 LdinW3 LdinW4 LdinW5 LdinW6 LdinW7 LdcWub, LdcWw  
60 LdcW0 LdcW2 LdcW4 LdcW6 LdcW8 LdcW10 LdcWm1 LdcW1
68 LdcW3 LdcW5 LdcW7 LdcW9 IncWb IncW2 IncW4 IncW6
70 IncW8 IncW10 IncW12 IncW14 IncW16 IncW1 IncW3 CvtWuQb
78 RepW Gotonb AddW SubW LdinL0 StinL0 Quoteb Equote
80 StinWb LdinoW StinoW LdinoB StinoB StinW0 StinW1, StinW2  
88 StinB0 StinpB0 StinQWb CallfpWb CallfpW2 CallfpW1, CallfpW0 CallfcWb  
90 CallfcW2 CallfcW1 CallfcW0 CallfcV2 CallfcV1 CallfcV0, IncWw CallfcL1  
98 CallfcL0 CallfpV0 StfpBb StgWb StgWw StgW0 StgW1, StgW2 StgW3  
a0 StgW4 StgW5 StgW6 StgW7 LdinBb LdinB1 LdinB3 LdinB0
a8 LdinB2 LdinB4 LdtW SttW LdintA StintW LdintB StintB
b0 Gotob Gotow Goto2 Goto4 Goto6 Goto1 Goto3 Goto5
b8 JeqWb JzrWb JzrW2 JzrW4 JzrW6 JzrW8 JzrW1 JzrW3
c0 JzrW5 JzrW7 JneWb JneW2 JneW4 JneW1 JneW3 JneW5
c8 JnzWb JnzW2 JnzW4 IncfBb INT3 SetfBb JleWb JltWb
d0 JgtWb JgeWb DecW1 AndW OrW ShlW ShlW1 ShrW
d8 MulW DivW DropW NegW -- Ret CaseW CmpuW
e0 SwapW AddWP CmpsL AddL SubL CvtWL Exo --
e8 LdgBb StgBb PushIPb DecWb LdifBb LdifWb LdifLb PopIP
f0 CvtBW LdfBb StfBb LdgLb JnzW1 JnzW3 JnzW5 LdfLb
f8 StfLb LdpLb LdpWb StgLb LdpW0 LdpW1 LdpW2 LdpW3

Table A.2 Extended Instructions

  0 1 2 3 4 5 6 7
  8 9 A B C D E F
0 NOP XorW PushWb PopWb MulL DivL SarW LdintW
8 RepL -- MulWWL DivLWW     BltNNB BltFFB
10 StifBb StifWb StifLb StinBb LdihoB StinLb LdihoW, StihoW  
18 LdinoL StinoL LdinLb CmpuL CmpD StifQWb CvtWsQb RetMB
20 BltNNBN BltFFBF -- -- -- -- -- -- --
28 AddHLH LdtL LdiftW StiftW LdiftB StiftB   LdihrW
30 LdifoB StifoB LdcL1 StifoW LdifoL CallfcVb -- --
38 RemuW DivuW NegL RemuL DivuL CallfcLb NotW RemW
40 RemL AndL OrL ShlL ShlL1 ShrL NotL XorL
48 SarL CaseL OverW CalinpV CallifpV CallincV CallifcV, CallinpW  
50 CallifpW CallincW CallifcW CallinpL CallifpL CallincL, CallifcL PushDS  
58 PushCS PushSS -- CallnpVb CallnpWb CallnpLb CallncVb, CallncWb  
60 CallncLb -- DivB RemB IncfWw   CallfpV2 CallfpV1
68 CallfpV0 CallfpLb CallfpL2 CallfpL1 CallfpL0 Quotew, JeqW3 JltW3  
70 JgtW3 JleW3 JgeW3 LdfgA -- -- -- IncfBw
78 LdfBw StfBw LdfLw StfLw -- -- -- --
80 IncfWbw IncfWww IncfBbb IncfFbb IncfBwb IncfFbw IncfLbb, IncfLbw  
88 IncfLbl IncfLwb IncfLww IncfLwl IncgBbb IncgFbb IncgWbw, IncgLbb  
90 IncgLbw IncgLbl IncfFwb IncfFww IncfHbb IncfHbw IncfHwb, IncfHww  
98 IncgFbw IncgHbb IncgHbw PushIPw -- -- -- --
a0 -- -- -- -- -- -- -- --
a8 -- -- -- -- -- -- -- --
b0 -- -- -- -- -- -- -- --
b8 -- -- -- -- -- -- -- --
c0 -- -- -- -- -- -- -- --
c8 LdcRr LdcDd -- -- -- -- -- --
d0 LdcTt LdfRw LdfDw LdfTw LdgRb LdgDb LdgTb LdinR
d8 LdinD LdinT StfRw StfDw StfTw StgRb StgDb StgTb
e0 StinR StinD StinT PushR PushD PushT SpillTb UnspillTb
e8 CvtWT CvtLT CvtTW CvtTL AddT SubT MulT DivT
f0 NegT CmpT DupT SwapT DropT LdifR LdifD LdifT
f8 StifR StifD StifT PopR CvtuWT CvtuLT CvtTuW CvtTuL