6-20 The Development Library
Syntax Example Notes
Reg1=Reg1^Reg2.f
Reg1^Reg2.f
B[BWSdT!
BWOdS!
Logical xor on the specified field
Reg1=-Reg1.f
O[0OdB!
Mathematical not on the specified field
Reg1=-Reg1-1.f
Reg1=~Reg1.f
O[0O03dB!
O[ˆOdB!
Logical not on the specified field
RReg=Reg.f
K8[BdY!
Sets the specified field of RReg to the value of the specified field of Reg
Only A and C are valid for Reg.
If f is W, the shorter encoding of the instruction is used
Reg=RReg.f
B[K8dB!
Sets the specified field of Reg to the value of the specified field of RReg
Only A and C are valid for Reg.
If f is W, the shorter encoding of the instruction is used
RegRRegEX.f
BK8<TdB!
Exchanged the value of the specified field of RReg with the value of the
specified field of Reg Only A and C are valid for Reg.
If f is W, the shorter encoding of the instruction is used
Data=Reg.f
Data=Reg.x
4B:3[OdB!
4B:8[Bd38!
Write the content of the specified field of the specified register in the
memory location pointed by Data register (POKE)
Reg can only be A or C
Reg= Data.f
Reg Data.x
O[4B:3dB!
B[4B:8d38!
Read the content of the memory location pointed by Data register in the
specified field of the REG register (PEEK)
Reg can only be A or C
DReg=hh
DReg=hhhh
DReg=hhhhh
DReg=(2)Exp
DReg=(4)Exp
DReg=(5)Exp
48[B4!
48[8388!
48[R8388!
48[-H/u$%)u!
48[-a/u$%'…38!
43[-Q/N$jt$%u)!
Change the first 2, 4 or all nibbles of the Data register with the given value
Dreg=Reg
48[B!
Reg can only be A or C
Dreg=RegS
48[OD!
Sets the first 4 nibbles of Dreg with the 4 first nibble of Reg
Reg can only be A or C
RegDRegEX
B48<T!
Reg can only be A or C
RegDRexXS
B43TD!
Exchange the first 4 nibbles of Dreg with the 4 first nibble of Reg
Reg can only be A or C
DReg=DReg+Cst
DReg+Cst
DReg=DReg-Cst
DReg-Cst
48[48'3H!
43'HQ!
43[4303H!
430Q!
Note 1: The Saturn processor is not able to add a constant greater than 16
to a register but if cst is greater than 16, MASD will generate as many
instructions as needed.
Note 2: Even if adding constants to a register is very useful, big constants
should be avoided because this will slow down execution, and generate a
big program.
Note 3: After adding a constant greater than 16, the carry should not be
tested.
Note 4: You can put an expression instead of the constant (MASD must be
able to evaluate the expression strait away). If the expression is negative,
MASD will invert the addition in a subtraction and vice versa.
Note 5: Be careful when using subtraction; it’s easy to be misled. D0-5-6.A
is equivalent to D0+1.A, not D0-11.A
Please read the section on test above for information on what MUST follow a test instruction.
f can NOT be a 7G field.
?Reg1=Reg2.f
bB[OdS!
?Reg1#Reg2.f
bBgOdB!
The HP special character can also be used
?Reg=0.f
bB[8dS!
?Reg#0.f
bBg8dB!
The HP special character can also be used
?Reg1<Reg2.f
bBzSdT!
?Reg1>Reg2.f
bO94dY!
?Reg1<=Reg2.f
bBz[SdT!
The HP <= character can be used
?Reg1>=Reg2.f
bO9[4dY!
The HP >= character can be used
?RegBIT=0.a
?RegBIT=1.a
bBS6:[8dQ!
bBS6:[3dGno%)j!
Test if a specific bit of A or C register is 0 or 1
Reg must be A or C