Epson S1C63000 Personal Computer User Manual


 
86 EPSON S1C63000 CORE CPU MANUAL
CHAPTER 4: INSTRUCTION SET
CMP [%ir],%r
CMP [%ir]+,%r Compare location [ir reg.] with r reg. and increment ir reg. 1 cycle
Function: [ir] - r, ir ir + 1
Subtracts the content of the r register (A or B) from the content of the data memory addressed
by the ir register (X or Y). It changes the flags (Z and C), but does not change the content of the
memory. Then increments the ir register (X or Y). The increment result of the ir register does
not affect the flags.
Code:
Mnemonic MSB LSB
CMP [%X]+,%A 11110011010011E69H
CMP [%X]+,%B 11110011011011E6DH
CMP [%Y]+,%A 11110011010111E6BH
CMP [%Y]+,%B 11110011011111E6FH
Flags: EICZ
↕↕
Mode: Src: Register direct
Dst: Register indirect
Extended addressing: Invalid
Compare location [ir reg.] with r reg. 1 cycle
Function: [ir] - r
Subtracts the content of the r register (A or B) from the content of the data memory addressed
by the ir register (X or Y). It changes the flags (Z and C), but does not change the content of the
memory.
Code:
Mnemonic MSB LSB
CMP [%X],%A 11110011010001E68H
CMP [%X],%B 11110011011001E6CH
CMP [%Y],%A 11110011010101E6AH
CMP [%Y],%B 11110011011101E6EH
Flags: EICZ
↕↕
Mode: Src: Register direct
Dst: Register indirect
Extended addressing: Valid
Extended LDB %EXT,imm8
operation: CMP [%X],%r [00imm8] - r (00imm8 = 0000H + 00H to FFH)
LDB %EXT,imm8
CMP [%Y],%r [FFimm8] - r (FFimm8 = FF00H + 00H to FFH)