DESCRIPTION OF INSTRUCTIONS

35. DJNZ Rr, code address (Decrement register, and jump if not zero)

 

 

7

 

 

 

 

 

 

 

 

 

 

 

 

0

 

Instruction code

:

1

 

1

 

0

1

 

 

1

r2

r1

r0

Byte 1

 

 

7

 

 

 

 

 

 

 

 

 

 

 

 

0

 

Relative offset

 

R7

R6

R5

 

R4

 

 

R3

R2

R1

R0

Byte 2

Operations

: (PC)(PC)+2

 

 

 

 

 

 

 

 

 

 

 

 

(Rr)(Rr)–1

 

r=0 thru 7

 

 

 

 

 

 

 

IF (Rr)0

 

 

 

 

 

 

 

 

 

 

 

 

 

THEN

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(PC)(PC)+relative offset

 

 

 

 

 

Number of bytes

: 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Number of cycles

: 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flags

:

C

AC

F0

 

RS1

 

 

RS0

OV

F1

P

 

(PSW)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

 

 

 

 

 

 

 

 

 

 

: The register r contents are decremented by 1. Control is shifted

 

 

to a relative jump address if the register r contents are not 0 as

 

 

a result of the decrement. Control is shifted to the next address

 

 

following this instruction if the result is 0.

 

 

285

Page 292
Image 292
Sonic Alert msm80154s, msm83c154s, msm85c154hvs user manual 285, Then