User guide
174 CHAPTER 10. THE DESIGN OF SIAL
F An opcode or dir e c ti ve
P A stack offset, 0 to #xFFFFFF
G A global variable number, 0 to 65535
K A 24-bit unsi gned constant, ofte n small in value
W A signed integer, used for static data and large constants
C A byte in range 0 to 255
L A label generated by translation phase
M A label generated by the Sial codegenerator
The instructions are for an abstract machine with the foll owing internal registers.
a The main accumulator, function first arg and r es ul t register
b The second accumulator used in dyadic operations
c Register used by pbyt and xpbyt, and possibly currupted by
some other instructions, such as mul, div, rem, xdiv and xrem
P Pointer to the base of the current stack frame
G Pointer to the base of the Global Vector
PC Set by jump an d call instrunctions
The opcodes and directives are as follows:
Mnemonic Operand(s) Meaning
lp Pn a := P!n
lg Gn a := G!n
ll Ln a := !Ln
llp Pn a := @ P!n
llg Gn a := @ G!n
lll Ln a := @ !Ln
lf Ln a := address of entry point Ln
l Kn a := n
lm Kn a := - n
sp Pn P!n := a
sg Gn G!n := a
sl Ln !Ln := a
ap Pn a := a + P!n
ag Gn a := a + G!n
a Kn a := a + n
s Kn a := a - n