Appendix AInstruction Set
546
Name, mnemonic, variations,
and symbol
PageOperand data
areas
Function
SET STACK
SSET, jSSET
(160)
SSET TB N
Defines a stack from TB to TB+N–1 and
resets to zero all words from TB+2 to TB+N–1.
TB contains the memory address for TB+N–1,
and TB+1 contains the memory address of
TB+2. TB+1 is called the stack pointer, and
contains the memory address for TB+2 after
SSET(160) is executed. N must be BCD
between #0003 and #9999.
TB:
CIO
G
A
DM
N:
CIO
G
A
T/C
#
DM
DR
IR
389
PUSH ONTO STACK
PUSH, jPUSH
(161)
PUSH TB S
Copies the data from the source word (S) to
the word indicated by the stack pointer (TB+1).
The memory address in the stack pointer is
then incremented by one.
TB must be the first address of a stack defined
using SSET(160).
TB:
CIO
G
A
DM
S:
CIO
G
A
T/C
#
DM
DR
IR
390
LAST IN FIRST OUT
LIFO, jLIFO
(162)
LIFO TB D
Decrements the memory address in the stack
pointer (TB+1) by one and then copies the
data from the word indicated by the stack
pointer (the last written to the table) to the
destination word (D). The stack pointer is the
only word changed in the stack.
TB must be the first address of a stack defined
using SSET(160).
TB:
CIO
G
A
DM
D:
CIO
G
A
DM
DR
IR
391
FIRST IN FIRST OUT
FIFO, jFIFO
(163)
FIFO TB D
Writes zero into the last word of the stack and
shifts the contents of each word within the
stack down by one address, finally shifting the
data from TB+2 (the first written to the stack)
to the destination word (D). The memory
address in the stack pointer (TB+1) is then
decremented by one.
TB must be the first address of a stack defined
using SSET(160).
TB:
CIO
G
A
DM
D:
CIO
G
A
DM
DR
IR
392
DATA SEARCH
SRCH, jSRCH
(164)
SRCH N St Cd
Searches the range of memory from St to
St+N–1 for addresses that contain the
comparison data (Cd). If the content of an
address within the range matches the
comparison data, the EQ Flag (A50006) is
turned ON and the address is written to Index
Register IR0. If more than one address
contains the comparison data, only the lowest
address containing the comparison data is
written to IR0. If none of the addresses within
the range contains the comparison data, the
EQ Flag (A50006) is turned OFF and IR0 is
left unchanged.
N:
CIO
G
A
T/C
#
DM
DR
IR
St:
CIO
G
A
T/C
DM
Cd:
CIO
G
A
T/C
#
DM
DR
IR
365
FIND MAXIMUM
MAX, jMAX
(165)
MAX C St D
Searches the range of memory from St to
St+N–1 for the address that contains the
maximum value and outputs that value to the
destination word (D). The number of words
within the range (N) is contained in the 3
rightmost digits of C, which must be BCD
between #001 and #999. When bit 15 of C is
OFF, data within the range is treated as
unsigned hexadecimal values, and when it is
ON the data is treated as signed hexadecimal
values. When bit 14 of C is OFF, the address
of the word containing the maximum value will
not be output to IR0; when it is ON, the value
will be output to IR0.
C:
CIO
G
A
#
DM
DR
IR
St:
CIO
G
A
T/C
DM
D:
CIO
G
A
DM
DR
IR
319