adf, sbf, sasf, setf


-

The adf, sbf, sasf, and setf instructions of the device should be specified in the following formats.

-

ADF cccc, reg1, reg2, reg3

-

SBF cccc, reg1, reg2, reg3

-

SASF cccc, reg2

-

SETF cccc, reg2

 

-

In asrh, the following formats can also be used in addition to the above.

-

adfcond reg1, reg2, reg3

-

sbfcond reg1, reg2, reg3

-

sasfcond reg2

-

setfcond reg2

 

-

Code that can be specified in cond and the result of assembly are shown in "Table 5.27 setfcond Instruction", using the setf instruction as an example.

Table 5.27

setfcond Instruction

Instruction

Flag Condition

Meaning of Flag Condition

Result of Assembly

setfgt

( (S xor OV) or Z) = 0

Greater than (signed)

setf 0xF
setfge

(S xor OV) = 0

Greater than or equal (signed)

setf 0xE
setflt

(S xor OV) = 1

Less than (signed)

setf 0x6
setfle

( (S xor OV) or Z) = 1

Less than or equal (signed)

setf 0x7
setfh

(CY or Z) = 0

Higher (Greater than)

setf 0xB
setfnl

CY = 0

Not lower (Greater than or equal)

setf 0x9
setfl

CY = 1

Lower (Less than)

setf 0x1
setfnh

(CY or Z) = 1

Not higher (Less than or equal)

setf 0x3
setfe

Z = 1

Equal

setf 0x2
setfne

Z = 0

Not equal

setf 0xA
setfv

OV = 1

Overflow

setf 0x0
setfnv

OV = 0

No overflow

setf 0x8
setfn

S = 1

Negative

setf 0x4
setfp

S = 0

Positive

setf 0xC
setfc

CY = 1

Carry

setf 0x1
setfnc

CY = 0

No carry

setf 0x9
setfz

Z = 1

Zero

setf 0x2
setfnz

Z = 0

Not zero

setf 0xA
setft

always 1

Always 1

setf 0x5
setfsa

SAT = 1

Saturated

setf 0xDNote

Note

sa(0xD) cannot be specified in the adf or sbf instruction. If specified, an error will occur.