APPENDIX
Appendix 6. Machine instructions
7902 Group User’s Manual
21-95
APPENDIX
Appendix 6. Machine instructions
7902 Group User’s Manual
21-94
Note 15. The number of cycles is the case where the number of bytes to be transferred (i) is even.
When the number of bytes to be transferred (i) is odd, the number is calculated as;
5 ! i + 10
Note 16. The number of cycles is the case where the number of bytes to be transferred (i) is even.
When the number of bytes to be transferred (i) is odd, the number is calculated as;
5 ! i + 14
Note that it is 10 cycles in the case of 1-byte thanster.
Note 17. i1 is the number of registers to be stored among A, B, X, Y, DPR0, and PS. i2 is the number of
registers to be stored between DT and PG.
Note 18. Letter “i1” indicates the number of registers to be restored.
Note 19. The number of cycles is applied when flag m = “1.” When flag m=“0,” the number is calculated
as;
18 ! imm + 5
Note 20. Any value from 0 through 3 is placed in an “n” in op code.”
Note 21. Do not use the SEP instruction to specify flag I. (When setting flag I to “1,” be sure to use the
SEI instruction.)
Note 22. Be sure to keep flag I = “1” when executing the PLP or PUL instruction. Also, be sure to use the
SEI instruction when setting flag I to “1.”
Notes for machine instructions table
The table lists the minimum number of instruction cycles for each instruction. The number of cycle is
changed by the following condition.
The value of the low-order bytes of DPR (DPRnL)
The number of cycle of the addressing mode related with DPRn (n = 0 to 3) is applied when DPRn = 0.
When DPRn
≠ 0, add 1 to the number of cycles.
The number of bytes of instruction which fetched into the instruction queue buffer
The address at read and write of memory (either even or odd)
When the external area accessed in BYTE = Vcc level (at external data bus width 8 bits)
The number of wait
Note 1.
The op code at the upper row is used for accumulator A, and the op code at the lower row is
used for accumulator B.
Note 2.
When handing 16-bit data with flag m = 0 in the immediate addressing mode, add 1 to the numder
of bytes.
Note 3.
When handing 16-bit data with flag m = 0, add 1 to the numder of bytes.
Note 4.
Imm is the immediate value specified with an operand (imm = 0–31).
Note 5.
The op code at the upper row is used for branching in the range of –128 to +127, and the op
code at the lower row is used for branching in the range of –32768 to +32767.
Note 6.
The BRK instruction is a instruction for debugger; it cannot be used.
Note 7.
Any value from 0 through 15 is placed in an “n.”
Note 8.
When handling 16-bit data with flag x = 0 in the immediate addressing mode, add 1 to the numder
of bytes.
Note 9.
The number of cycles is the case of the 16-bit ÷ 8-bit operation. In the case of the 32-bit ÷
16-bit operation, add 8 to the number of cycles.
Note 10. When a zero division interrupt occurs, the number of cycles is 16 cycles. It is regardless of the
data length.
Note 11. When placing a value in any of DPRs, the op code at the upper row is applied. When placing
values to multiple DPRs, the op code at the lower row is applied. The letter “i” represents the
number of DPRn specified: 1 to 4.
Note 12. A “?” indicates to the value of 4 bits which the bit corressing to the specified DPRn becomes “1.”
Note 13. When the source is in the immediate addressing mode and flag m = 0, add n (n = 0 to 15) to
the number of bytes.
Note 14. The number of cycles of the case of the 8-bit ! 8-bit operation. In the case of the 16-bit !
16-bit operation, add 4 to the number of cycles.