TJZ

Instruction: Test value and jump to address if zero.

TJZ Value, < # > Address

  • Value (d-field) is the register to test.
  • Address (s-field) is the register or a 9-bit literal whose value is the address to jump to when Value contains zero.

Opcode Table:

–INSTR– ZCRI –CON–    –DEST–         –SRC–

Z Result

C Result

Result

Clocks

 111011    000i    1111    ddddddddd    sssssssss

D = 0

0

Not Written

4 or 8

Concise Truth Table:

In

Out

Destination

Source

Z

C

Effects

Destination1

Z

C

$0000_0000; 0

$----_----; -

-

-

wr wz wc

$0000_0000; 0

1

0

$0000_0001; 1

$----_----; -

-

-

wr wz wc

$0000_0001; 1

0

0

1 Destination is not written unless the WR effect is given.

Explanation

TJZ tests the Value register and jumps to Address if it contains zero.

When the WZ effect is specified, the Z flag is set (1) if the Value register contains zero.

TJZ requires a different amount of clock cycles depending on whether or not it has to jump. If it must jump it takes 4 clock cycles, if no jump occurs it takes 8 clock cycles.

Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.