Query regarding Microcontroller 8051
as in microprocessor we have zero flag in its Program Status Word to check the zero status but in microcontroller 8051 we don't have this type of flag in the PSW so my question is when the conditional jump instruction is executed in the microcontroller (instructions like DJNZ, JZ, JNZ), then how microcontroller decides that now the contents of register A has become zero without having the zero flag in its Program Status Word (PSW)??????
Replies
-
Jeffrey ArulrajThe Zero Flag in MC8051 is not present.
JNC, JC and all check the status of the Carry flag to do all the operations you have asked here for
Have fun exploring 8051 -
sparsh sharma
Thank you Sir, but i have one doubt that DJNZ means jump if contents of register A is not zero, so where is carry flag effected in DJNZ instruction, will you please clarify your answer.........Jeffrey SamuelThe Zero Flag in MC8051 is not present.
DJNZ and all check the status of the Carry flag to do all the operations you have asked here for
Have fun exploring 8051 -
Jeffrey Arulraj
Sorry about that I made a small error I corrected itsparsh sharmaThank you Sir, but i have one doubt that DJNZ means jump if contents of register A is not zero, so where is carry flag effected in DJNZ instruction, will you please clarify your answer......... -
sparsh sharma
sir i just want to know that how microcontroller gets notification about the contents of accumulatorJeffrey SamuelSorry about that I made a small error I corrected it -
Harshad Italiya
I didn't get this question. Accumulator is part of Microcontroller itself. No need for microcontroller to get notification from accumulator.sparsh sharmasir i just want to know that how microcontroller gets notification about the contents of accumulator -
sparsh sharma
i mean as in case of microprocessor there is a zero flag which becomes high when accumulator contents become zero then why is it not present in the microcontrollerHarshad ItaliyaI didn't get this question. Accumulator is part of Microcontroller itself. No need for microcontroller to get notification from accumulator. -
Harshad Italiya
Microprocessor and Microcontroller are two different things. 8051 is Microcontroller and 8051 has Zero flag.sparsh sharmai mean as in case of microprocessor there is a zero flag which becomes high when accumulator contents become zero then why is it not present in the microcontroller
Sorry but I am still not getting things clear about your questions. -
sparsh sharma
sir, my question is without any zero flag how microcontroller decides that now the contents of A-register has become zero ? like in case of carry instructions (jnc, jc etc) there is a carry flag to give indication about the carry. then why zero flag is not there.Harshad ItaliyaMicroprocessor and Microcontroller are two different things. 8051 is Microcontroller and 8051 has Zero flag.
Sorry but I am still not getting things clear about your questions. -
Murthy YayavaramDear Friend, the Zero flag is an indication of status of CPU after some arithmetic operation.O.K. Normally in microprocessors, this status is used to implement some condition .While implementing the condition (for ex say branch condition) the CPU will check the status of this zero flag and act accordingly.But in the case of 8051 micro controller ,the accumulator can be made zero by other instructions also and the same status can be checked using J Z ,JNZ etc...So the controller can manage without zero flag also. hope I am clear ..
You are reading an archived discussion.
Related Posts
already I install windows 8.1 pro in pc but the programs are not able to run / compile . also I not getting output . it is not working properly...
Hello Everyone,
I need help identifying courses for MS abroad. I have completed B.E. in Computer Engg. and have been working past 3 years as Software Engg in one of...
i am planning to build a go kart ...can any one send me the innovative changes that can be done to improve its safety and accuracy like new steering etc.
I am a final year student of Information Technology with CGPA of 8.21,till date.I am concerned about the campus placement because I have heard that most of the companies have...
(sent by my daughter)
Quote:
In June 2013, a group of friends launched a weather balloon strapped with a GoPro Hero3, a Sony Camcorder, and a Samsung Galaxy Note II....