Pl/0 Op Codes

Basic operations in P-code interpreter (not all are needed for your program):

   Lit 0,A   : Load constant a
   Opr 0,A   : Execute operation A

               A       Operation
               0       return
               1       unary minus
               2       addition
               3       subtraction
               4       multiplication
               5       division (DIV)
               6       = test for equality
               7       <>
               8       <
               9       <=
               10      >
               11      >=
  Lod L,A    :  Load variable L,A
  Lad L,A    :  Load the address of the variable at L,A
  Lid L,A    :  load the data stored at the address contained in L,A
  Sto L,A    : Store variable L,A
  Sti L,A    : Store at the address contained in L,A
  Cal L,A    : Call procedure A at level L
  Int 0,A    : Increment t-register by A
  Jmp 0,A    : Jump to A
  Jmc 0,A    : Jump conditional to A
  Inb 0,0     : Increment base before processing parameters in MatchParameters
  Deb 0,0    : Decrement the base after processing parameters in MatchParameters
  Mrk 0,0    : Mark the stack top
  Lmk 0,0    : Load marked stack location into current stack top
  Rmk 0,0    : Release memory down to stack mark