ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
67
M8C Instruction Set
4.30
Absolute Table Read
ROMX
Moves any byte from ROM (Flash) into the Accumulator. The address of the byte to be retrieved is
determined by the 16-bit value formed by the concatenation of the CPU_A and CPU_X registers.
The CPU_A register is the most significant byte and the CPU_X register is the least significant byte
of the address. The Zero Flag is set if the retrieved byte is zero; otherwise, the Zero Flag is cleared.
The Carry Flag is not affected by this instruction.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
ROMX
0x28
11
1
Conditional
Flags:
CF
ZF
Unaffected.
Set if
A
is zero; cleared otherwise.
Example:
0000
_main:
0000
50 00
[04]
mov A, 00h
0002
57 08
[04]
mov X, 08h
0004
28
[11]
romx
0005
60 00
[05]
mov reg[00h], A
0007
40
[04]
nop
0008
30
[04]
halt
The
ROMX
instruction will read a byte from Flash at address
0x0008
. The
halt
opcode is at address
0x0008
; therefore, register
0x00
will receive the value
0x30
.
t1
PC 7:0
PC 7:0
X
t2
PC 15:8
PC 15:8
A
A
rom PC
PC 7:0
t1
PC 15:8
t2
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 ...