Digital Electronics - The 8051 Microcontroller - Discussion
Discussion Forum : The 8051 Microcontroller - General Questions (Q.No. 2)
2.
This program code will be executed continuously:
STAT: | MOV A, #01H |
JNZ STAT |
Discussion:
18 comments Page 2 of 2.
Vishnu said:
1 decade ago
JNZ instruction checks the Contents of Accumulator(A) register.
it's value is greater than zero every time... because it is not decrmenting. So, the loop will infinitely repeats...
it's value is greater than zero every time... because it is not decrmenting. So, the loop will infinitely repeats...
Shreyas said:
1 decade ago
DCR A instruction should be given after STAT: MOV A , 01H
AMAR V. SORATHIYA said:
1 decade ago
If instuction DJNZ used then answer is FALSE.
Siva said:
1 decade ago
Any one explain other use of JNZ?
Vikram said:
1 decade ago
First instruction copies the immediate data 01h to A (no flag is effected) , second instruction compares the content of carry flag with zero if it is not equal to zero then it becomes infinite loop otherwise it executes next instruction.
Shruti said:
1 decade ago
#01 signifies value..that means 1 is been stored in accumulator..JNZ means jump if not zero. as accumlator has value 1..this process will continue with execution whenevr it checks the condition.
Mahi.. said:
1 decade ago
# represents immediate addressing to A. #01 is an imediate value to A..JNZ jump if not zero will satisfy the condition and continuopusly jmps to stat flag.. its a loop.
Rajender said:
1 decade ago
Since there is no loop available or there is no INC/DCR is available.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers