Epson S1C63000 Personal Computer User Manual


 
S1C63000 CORE CPU MANUAL EPSON 85
CHAPTER 4: INSTRUCTION SET
CMP %r,[%ir]
CMP %r,[%ir]+
Compare r reg. with location [ir reg.] 1 cycle
Function: r - [ir]
Subtracts the content of the data memory addressed by the ir register (X or Y) from the content
of the r register (A or B). It changes the flags (Z and C), but does not change the content of the
register.
Code:
Mnemonic MSB LSB
CMP %A,[%X] 11110011000001E60H
CMP %A,[%Y] 11110011000101E62H
CMP %B,[%X] 11110011001001E64H
CMP %B,[%Y] 11110011001101E66H
Flags: EICZ
↕↕
Mode: Src: Register indirect
Dst: Register direct
Extended addressing: Valid
Extended LDB %EXT,imm8
operation: CMP %r,[%X] r - [00imm8] (00imm8 = 0000H + 00H to FFH)
LDB %EXT,imm8
CMP %r,[%Y] r - [FFimm8] (FFimm8 = FF00H + 00H to FFH)
Compare r reg. with location [ir reg.] and increment ir reg. 1 cycle
Function: r - [ir], ir ir + 1
Subtracts the content of the data memory addressed by the ir register (X or Y) from the content
of the r register (A or B). It changes the flags (Z and C), but does not change the content of the
register. 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 %A,[%X]+ 11110011000011E61H
CMP %A,[%Y]+ 11110011000111E63H
CMP %B,[%X]+ 11110011001011E65H
CMP %B,[%Y]+ 11110011001111E67H
Flags: EICZ
↕↕
Mode: Src: Register indirect
Dst: Register direct
Extended addressing: Invalid