33
TABLE 17. USER SPACE INSTRUCTIONS
INSTRUCTION CODE
OPERATION
15 14 13 12
11 10 9 8
7 6 5 4
3 2 1 0
(1ST CYCLE)
(2ND CYCLE)
1 1 0 0
0 0 0 i
0 0 R u
u u u u
u-read SWAP
inv
1 1 0 0
1 1 1 i
0 0 R u
u u u u
u-read SWAP
SWAP inv
1 1 0 0
c c c c
0 0 R u
u u u u
u-read SWAP
SWAP OVER alu-op
1 1 0 0
0 0 0 i
1 0 R u
u u u u
DUP u-write
inv
1 1 0 0
1 1 1 i
1 0 R u
u u u u
DUP u-write
DROP inv
1 1 0 0
c c c c
1 0 R u
u u u u
u-read SWAP
alu-op
TABLE 18. ALU FUNCTION INSTRUCTIONS
INSTRUCTION CODE
OPERATION
15 14 13 12
11 10 9 8
7 6 5 4
3 2 1 0
1 0 1 0
0 0 0 i
0 0 R 0
s s s s
inv shift
1 0 1 0
1 1 1 i
0 0 R 0
s s s s
DROP DUP
inv shift
1 0 1 0
c c c c
0 0 R 0
s s s s
OVER SWAP
alu-op shift
1 0 1 0
0 0 0 i
0 1 R 0
s s s s
SWAP DROP
inv shift
1 0 1 0
1 1 1 i
0 1 R 0
s s s s
DROP
inv shift
1 0 1 0
c c c c
0 1 R 0
s s s s
alu-op shift
1 0 1 0
0 0 0 i
1 0 R 0
s s s s
SWAP DROP DUP
inv shift
1 0 1 0
1 1 1 i
1 0 R 0
s s s s
SWAP
inv shift
1 0 1 0
c c c c
1 0 R 0
s s s s
SWAP OVER
alu-op shift
1 0 1 0
0 0 0 i
1 1 R 0
s s s s
DUP
inv shift
1 0 1 0
1 1 1 i
1 1 R 0
s s s s
OVER
inv shift
1 0 1 0
c c c c
1 1 R 0
s s s s
OVER OVER
alu-op shift
TABLE 19. STEP MATH FUNCTIONS
(NOTE 25)
INSTRUCTION CODE
OPERATION
15 14 13 12
11 10 9 8
7 6 5 4
3 2 1 0
1 0 1 0
- - - -
- - - 1
- - - -
(See the Programmer’s Reference Manual)
NOTE:
25. These instructions perform multi-step math functions such as multiplication, division and square root functions. Use of either the Streamed
instruction mode or masking of interrupts is recommended to avoid erroneous results when performing Step Math operations.
Unsigned Division:
Load dividend into
Load divisor into
Execute single step form of D2 (Note 25) instruction 1 time
Execute opcode A41A 1 time
Execute opcode A45A 14 times
Execute opcode A458 1 time
The quotient is in
NEXT
and
, the remainder in
Square Root Operations:
Load value into
Load 8000H into
Load 0 into
Execute single step form of D2 (Note 25) instruction 1 time
Execute opcode A51A 1 time
Execute opcode A55A 14 times
Execute opcode A558 1 time
The root is in
, the remainder in
NEXT
and
TOP
MD
NEXT
TOP
TOP
SR
NEXT
MD
TOP
HS-RTX2010RH