Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Conditional Instructions JZ and JNZ

Status
Not open for further replies.

jones86

Newbie level 2
Joined
Jan 14, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
jz jnz

These both instructions JZ and JNZ are not working for me. ie for JZ(Jump on Zero) though the accumulator is not zero, i am getting the jump instruction executed.

Pls help my explaining in small programs
 

jz y jnz instrucciones

Please give more details, what software are you using and what microcontroller etc.

Nandhu
 

condicional instructions

Those instructions usually check the zero flag in a status register, not the contents of the accumulator.

As Nandhu says, we need more information. A section of code showing the problem would help.

Brian.
 

jz to jnz

Please post the microcontroller type used and the portion of code (JZ, JNZ) is giving trouble.
 

jnz $-20

betwixt is correct. jz and jnz will check to see the ZERO flag, not the accumulator. This condition is true for any microprocessor, I believe. Basically, something is done in previous two or three instructions before JZ and after that you test the zero flag. You might wanna read more on how the zero flag is affected by other instructions.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top