ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
73
M8C Instruction Set
4.36
Test for Mask
TST
Calculates a bitwise AND with the value of argument one and argument two. Argument one’s value
is not affected by the
TST
instruction. If the result of the AND is zero, the Zero Flag is set; otherwise,
the Zero Flag is cleared. The Carry Flag is not affected by the
TST
instruction.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
TST
[expr], expr
0x47
8
3
TST
[X+expr], expr
0x48
9
3
TST
REG[expr], expr
0x49
9
3
TST
REG[X+expr],
expr
0x4A
10
3
Conditional
Flags:
CF
ZF
Unaffected.
Set if the result of AND is zero; cleared otherwise.
Example:
mov
[0x00], 0x03
tst
[0x00], 0x02
;CF=0, ZF=0 (i.e. bit 1 is 1)
tst
[0x00], 0x01
;CF=0, ZF=0 (i.e. bit 0 is 1)
tst
[0x00], 0x03
;CF=0, ZF=0 (i.e. bit 0 and 1 are 1)
tst
[0x00], 0x04
;CF=0, ZF=1 (i.e. bit 2 is 0)
ram k
1
& k
2
ram X k
1
+
& k
2
reg k
1
& k
2
reg X k
1
+
& k
2
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...