-
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)??????0
-
Member • Sep 13, 2015
The 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 8051Are you sure? This action cannot be undone. -
Member • Sep 13, 2015
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 8051Are you sure? This action cannot be undone. -
Member • Sep 13, 2015
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.........Are you sure? This action cannot be undone. -
Member • Sep 15, 2015
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 itAre you sure? This action cannot be undone. -
Member • Sep 15, 2015
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 accumulatorAre you sure? This action cannot be undone. -
Member • Sep 16, 2015
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.Are you sure? This action cannot be undone. -
Member • Sep 16, 2015
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.Are you sure? This action cannot be undone. -
Member • Sep 19, 2015
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.Are you sure? This action cannot be undone. -
Member • Dec 9, 2015
Dear 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 ..Are you sure? This action cannot be undone.