3.3 Instruction Set Outline

“Load Immediate Data to a Register” on page 33

“Load or Store Data from or to a Constant Address” on page 33 “Load or Store Data Using an Index Register” on page 34 “Register-to-Register Move” on page 35

“Register Exchanges” on page 35 “Push and Pop Instructions” on page 36

“16-bit Arithmetic and Logical Ops” on page 36

“Input/Output Instructions” on page 39—these include a fix for a bug that manifests itself if an I/O instruction (prefix IOI or IOE) is followed by one of 12 single-byte op codes that use HL as an index register.

In the discussion that follows, we give a few example instructions in each general category and contrast the Z80/ Z180 with the Rabbit. For a detailed description of every instruction, see Chapter 19, “Rabbit Instructions”

The Rabbit executes instructions in fewer clocks then the Z80 or Z180. The Z180 usually requires a minimum of four clocks for 1-byte opcodes or three clocks for each byte for multi-byte op codes. In addition, three clocks are required for each data byte read or writ- ten. Many instructions in the Z180 require a substantial number of additional clocks. The Rabbit usually requires two clocks for each byte of the op code and for each data byte read. Three clocks are needed for each data byte written. One additional clock is required if a memory address needs to be computed or an index register is used for addressing. Only a few instructions don’t follow this pattern. An example is mul, a 16 x 16 bit signed two’s complement multiply. mul is a 1-byte op code, but requires 12 clocks to execute. Compared to the Z180, not only does the Rabbit require fewer clocks, but in a typical situ- ation it has a higher clock speed and its instructions are more powerful.

The most important instruction set improvements in the Rabbit over the Z180 are in the following areas.

Fetching and storing data, especially 16-bit words, relative to the stack pointer or the index registers IX, IY, and HL.

16-bit arithmetic and logical operations, including 16-bit and’s, or’s, shifts and 16-bit multiply.

Communication between the regular and alternate registers and between the index reg- isters and the regular registers is greatly facilitated by new instructions. In the Z180 the alternate register set is difficult to use, while in the Rabbit it is well integrated with the regular register set.

Long calls, long returns and long jumps facilitate the use of 1M of code space. This removes the need in the Z180 to utilize inefficient memory banking schemes for larger programs that exceed 64K of code.

32

Rabbit 3000 Microprocessor

Page 41
Image 41
Jameco Electronics 2000, 3000 manual Instruction Set Outline