Jr - Jump Relative - Samsung SAM88RCRI S3C9442 Manual

Table of Contents

Advertisement

SAM88RCRI INSTRUCTION SET
JR
— Jump Relative
JR
cc,dst
If cc is true, PC ← PC + dst
Operation:
If the condition specified by the condition code (cc) is true, the relative address is added to the
program counter and control passes to the statement whose address is now in the program
counter; otherwise, the instruction following the JR instruction is executed (See list of condition
codes).
The range of the relative address is + 127, – 128, and the original value of the program counter is
taken to be the address of the first instruction byte following the JR statement.
Flags:
No flags are affected.
Format:
(note)
cc | opc
NOTE: In the first byte of the two-byte instruction format, the condition code and the op code are each
Example:
Given: The carry flag = "1" and LABEL_X = 1FF7H:
JR
If the carry flag is set (that is, if the condition code is true), the statement "JR C,LABEL_X" will
pass control to the statement whose address is now in the PC. Otherwise, the program instruction
following the JR would be executed.
6-26
dst
four bits.
C,LABEL_X
Bytes
2
PC = 1FF7H
S3C9442/C9444/F9444/C9452/C9454/F9454
Cycles
Opcode
(Hex)
6
ccB
cc = 0 to F
Addr Mode
dst
RA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sam88rcri s3c9444Sam88rcri s3c9452Sam88rcri s3c9454

Table of Contents