ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
71
M8C Instruction Set
4.34
Swap
SWAP
Each argument is updated with the other argument’s value. The Zero Flag is set if the Accumulator is
updated with zero, else the Zero Flag is cleared. The
swap X, [expr]
instruction does not affect
either the Carry or Zero Flags.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
SWAP
A, X
0x4B
5
1
SWAP
A, [expr]
0x4C
7
2
SWAP
X, [expr]
0x4D
7
2
SWAP
A, SP
0x4E
5
1
Conditional
Flags:
CF
ZF
Unaffected.
Set if Accumulator is cleared.
Example:
mov
A, 0x30
swap A, SP
;SP=0x30, A equals previous SP value
t
X
X
A
A
t
t
ram k
ram k
A
A
t
t
ram k
ram k
X
X
t
t
SP
SP
A
A
t
Содержание PSoC DESIGNER ImageCraft M8C
Страница 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Страница 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Страница 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Страница 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Страница 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Страница 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Страница 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...