Go backward to Instruction Encoding
Go up to Top
Go forward to Appendix A: Operation Codes

Instruction Set

Brief descriptions of all of the instructions the WC34000 implements are given below. The numeric values of the operation codes for these instruction are listed in an appendix at the end of this document. This appendix also provides an index providing links to the descriptions of individual instructions.

Instruction Description
  ADD src-ea, dst-ea src + dst -> dst
  Add the value of the source operand to the destination operand.
  AND  src-ea, dst-ea bitwise ( src & dst ) -> dst
  Replace the destination operand with the bit-wise logical AND of the source and destination operand values.
  ASL  src-ea, dst-ea dst shifted left by src bits -> dst
  Shift the value of the destination operand left by a number of bits equal to the value of the source operand.
  ASR  src-ea, dst-ea dst shifted right by src bits -> dst
  Shift the value of the destination operand right by a number of bits equal to the value of the source operand. The shift is arithmetic, i.e. the sign bit is propagated as the shift is performed.
  BEQ  dst-ea if Z then address of dst -> PC
  If the Z bit of the CCR is 1, transfer program execution to the instruction at the address specified by the operand. Otherwise, the instruction has no effect.
  BGE  dst-ea if ( N = V ) then address of dst -> PC
  If the N and V bits of the CCR are equal, transfer program execution to the instruction at the address specified by the operand. Otherwise, the instruction has no effect.
  BGT  dst-ea if not Z & ( N = V ) then address of dst -> PC
  If the Z bit of the CCR is 0 and the N and V bits are equal, transfer program execution to the instruction at the address specified by the operand. Otherwise, the instruction has no effect.
  BLE  dst-ea if Z or ( N != V) then address of dst -> PC
  If the Z bit of the CCR is 0 or the N and Z bits are not equal, transfer program execution to the instruction at the address specified by the operand. Otherwise, the instruction has no effect.
  BLT  dst-ea if ( N != V) then address of dst -> PC
  If the N and V bits of the CCR are not equal, transfer program execution to the instruction at the address specified by the operand. Otherwise, the instruction has no effect.
  BNE  dst-ea if not Z then address of dst -> PC
  If the Z bit of the CCR is 0, transfer program execution to the instruction at the address specified by the operand. Otherwise, the instruction has no effect.
  CLR  dst-ea 0 -> dst
  The operand is set to zero.
  CMP  src-ea, dst-ea dst - src
  Subtract the source operand's value from the destination operand's value, but do not modify either operand. Instead, simply update the bits of the condition code register to reflect the result of the subtraction. In particular the N bit should be set to 1 only if the result is negative. The Z bit should be set to 1 only if the result is zero. The V bit should be set to 1 only if the result cannot be stored in a 16-bit word.
  DIVS  src-ea, dst-ea dst / src -> dst
  Divide the value of the destination operand by the value of the source operand and store the quotient in the destination.
  EOR  src-ea, dst-ea bitwise ( dst != src ) -> dst
  Replace the destination operand with the bit-wise exclusive OR of the source and destination operand values.
  GETCH  dst-ea input -> dst
  Replace the operand's value by the ASCII code representing the next available input character.
  GETNUM  dst-ea input -> dst
  Read input characters until a complete decimal number has been found and store the value of the number in the operand.
  HALT  Halt the processor.
 
  JMP  dst-ea address of dst -> PC
  Transfer program execution to the effective address specified by the operand.
  JSR  dst-ea SP - 1 -> SP; PC -> (SP)
address of dst -> PC
  Push the address of the next instruction in memory onto the stack, then transfer program execution to the effective address specified by the operand.
  LEA  src-ea, dst-ea address of src -> dst
  Store the value of the memory address of the source operand in the destination. The source operand may not be specified using either of the register direct addressing modes.
  LINK  An, disp-ea SP - 1 -> SP; An -> (SP);
SP -> An; SP + disp -> SP
  Push the current value of the address register specified by the first operand onto the stack. Replace the value of An by the value of the SP register after the push. Finally, increment the SP register by the value of the instruction's second operand.
  MOVE src-ea,dst-ea scr -> dst
  Move the value of the source operand to the destination operand.
  MULS  src-ea, dst-ea src * dst -> dst
  Replace the value of the destination operand with the product of the source and destination operand. If the size of the result exceeds 16 bits, only the low order 16 bits are stored.
  NEG  dst-ea - dst -> dst
  The operand is replaced by the result of subtracting its original value from zero.
  NOT  dst-ea bitwise not of dst -> dst
  The operand is replaced by the bit-wise logical negation of its value.
  OR  src-ea, dst-ea bitwise ( src or dst ) -> dst
  Replace the destination operand with the bit-wise logical OR of the source and destination operand values.
  OUTCH  dst-ea dst -> output
  Print the operand, treating its value as the ASCII representation of a single character (the high-order 8 bits of the operand are ignored).
  OUTNUM  dst-ea dst -> output
  Print the operand, treating its value as a signed 16-bit integer.
  PEA  dst-ea SP - 1 -> SP; address of dst -> (SP)
  Compute the memory address of the operand and then push the address onto the stack.
  POPREG  dst-ea
  The operand is treated as a 16 bit string with one bit corresponding to each of the data and address registers. The high order bits are associated with registers D0 through D7 and the low order bits are associated with A0 through A7. The highest order bit corresponds to D0 and the lowest order bit in the mask corresponds to A7. For each bit that is one, a word is popped off the stack and its value is loaded into the corresponding register. Bit are examined from the lowest order bit (corresponding to A7) to the highest order bit and pops are performed in the same order.
  PSHREG  dst-ea
  The operand is treated as a 16 bit string with one bit corresponding to each of the data and address registers. The correspondence between the bits in the mask and the machine's registers as the same as in the POPREG instruction. For each bit that is one, the corresponding register is pushed onto the stack. Bits are examined in order from the highest order bit in the mask (the bit corresponding to D0) to the lowest order bit and register values are pushed in the same order.
  RTD  src-ea (SP) -> PC; SP + 1 + src -> SP
  Pop a new value for the PC from the top of the stack and then increment the SP register by the value of the instruction's operand.
  SUB  src-ea, dst-ea dst - src -> dst
  Subtract the value of the source operand from the destination operand.
  UNLK  dst-ea dst -> SP; (SP) -> dst;
SP + 1 -> SP
  First, set the SP equal to the original value of the instruction's operand. Then, replace the operand's value by a value popped from the stack.


Prev Up Next