Sunday 5 October 2014

CJNE and JB

CJNE
Function:
Compare and Jump If Not Equal
Syntax:
CJNE operand1,operand2,reladdr

Instructions
OpCode
Bytes
Flags
CJNE A,#data,reladdr
0xB4
3
C
CJNE A,iram addr,reladdr
0xB5
3
C
CJNE @R0,#data,reladdr
0xB6
3
C
CJNE @R1,#data,reladdr
0xB7
3
C
CJNE R0,#data,reladdr
0xB8
3
C
CJNE R1,#data,reladdr
0xB9
3
C
CJNE R2,#data,reladdr
0xBA
3
C
CJNE R3,#data,reladdr
0xBB
3
C
CJNE R4,#data,reladdr
0xBC
3
C
CJNE R5,#data,reladdr
0xBD
3
C
CJNE R6,#data,reladdr
0xBE
3
C
CJNE R7,#data,reladdr
0xBF
3
C
Description: CJNE compares the value of operand1 and operand2 and branches to the indicated relative address if operand1 and operand2 are not equal. If the two operands are equal program flow continues with the instruction following the CJNE instruction.
The Carry bit (C) is set if operand1 is less than operand2, otherwise it is cleared.


Instruction Set: JB
JB
Function:
Jump if Bit Set
Syntax:
JB bit addrreladdr

Instructions
OpCode
Bytes
Flags
JB bit addr,reladdr
0x20
3
None

Description: JB branches to the address indicated by reladdr if the bit indicated by bit addr is set. If the bit is not set program execution continues with the instruction following the JB instruction.

No comments:

Post a Comment