sasf


Sets the flag condition after a logical left shift.

[Syntax]

-

sasf imm4, reg

-

sasfcnd reg

 

The following can be specified for imm4:

-

Absolute expression having a value up to 4 bits

[Function]

-

Syntax "sasf imm4, reg"

Compares the flag condition indicated by the value of the lower 4 bits of the absolute expression specified by the first operand with the current flag condition. If a match is found, the contents of the register specified by the second operand are shifted logically 1 bit to the left and ORed with 1, and the result stored in the register specified by the second operand; otherwise, the contents of the register specified by the second operand are logically shifted 1 bit to the left and the result stored in the register specified by the second operand.

-

Syntax "sasfcnd reg"

Compares the flag condition indicated by string cnd with the current flag condition. If a match is found, the contents of the register specified by the second operand are shifted logically 1 bit to the left and ORed with 1, and the result stored in the register specified by the second operand; otherwise, the contents of the register specified by the second operand are shifted logically 1 bit to the left and the result stored in the register specified by the second operand.

[Description]

-

If the instruction is executed in syntax "sasf imm4, reg", the assembler generates one sasf machine instruction.

-

If the instruction is executed in syntax "sasfcnd reg", the assembler generates the corresponding sasf instruction (see "Table 5.33 sasfcnd Instruction List") and expands it to syntax "sasf imm4, reg".

Table 5.33

sasfcnd Instruction List

Instruction

Flag Condition

Meaning of Flag Condition

Instruction Conversion

sasfgt

( (S xor OV) or Z) = 0

Greater than (signed)

sasf 0xF
sasfge

(S xor OV) = 0

Greater than or equal (signed)

sasf 0xE
sasflt

(S xor OV) = 1

Less than (signed)

sasf 0x6
sasfle

( (S xor OV) or Z) = 1

Less than or equal (signed)

sasf 0x7
sasfh

(CY or Z) = 0

Higher (Greater than)

sasf 0xB
sasfnl

CY = 0

Not lower (Greater than or equal)

sasf 0x9
sasfl

CY = 1

Lower (Less than)

sasf 0x1
sasfnh

(CY or Z) = 1

Not higher (Less than or equal)

sasf 0x3
sasfe

Z = 1

Equal

sasf 0x2
sasfne

Z = 0

Not equal

sasf 0xA
sasfv

OV = 1

Overflow

sasf 0x0
sasfnv

OV = 0

No overflow

sasf 0x8
sasfn

S = 1

Negative

sasf 0x4
sasfp

S = 0

Positive

sasf 0xC
sasfc

CY = 1

Carry

sasf 0x1
sasfnc

CY = 0

No carry

sasf 0x9
sasfz

Z = 1

Zero

sasf 0x2
sasfnz

Z = 0

Not zero

sasf 0xA
sasft

always 1

Always 1

sasf 0x5
sasfsa

SAT = 1

Saturated

sasf 0xD

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---

[Caution]

-

If an absolute expression having a value exceeding 4 bits is specified as imm4 of the sasf instruction, the assembler outputs the following message and continues assembling using four low-order bits of a specified value.

W0550011 : illegal operand (range error in immediate).