answersLogoWhite

0

for example:

int flag= 0; /* 0/1 = unset/set */
...
printf ("flag=%d which means %s\n", flag, flag? "set": "unset");

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Write a note on control status registers and program status word?

yar pls koi to answer likkhooo...


What is psw in 8051?

It is program status register.It i 8 bit ,bit addressable register.It consists of four maths flag.


What is the usage of 8086 status register?

The 8086 status register, also known as the FLAGS register, is crucial for controlling the operation of the microprocessor. It contains individual flags that reflect the status of the processor and the outcome of arithmetic and logical operations, including the Zero Flag, Sign Flag, Overflow Flag, and Carry Flag. These flags are used for conditional branching and to indicate conditions such as equality, overflow, and carry-out, influencing program flow and decision-making processes within applications.


What are the status flags in 8085?

In the 8085 microprocessor, the status flags are specific bits in the flag register that indicate the outcome of arithmetic and logical operations. There are five main flags: the Sign Flag (S), Zero Flag (Z), Auxiliary Carry Flag (AC), Parity Flag (P), and Carry Flag (CY). The Sign Flag indicates the sign of the result, the Zero Flag indicates if the result is zero, the Auxiliary Carry Flag is used for BCD operations, the Parity Flag indicates if the number of set bits is even or odd, and the Carry Flag indicates an overflow in arithmetic operations. These flags are essential for decision-making in program execution and control flow.


Show bitwise psw of 8085 and 8086 and explain the function of each flag with an example?

The Program Status Word (PSW) for the 8085 and 8086 microprocessors consists of various flags that indicate the status of operations. In the 8085, the flags include the Sign Flag (S), Zero Flag (Z), Auxiliary Carry Flag (AC), Parity Flag (P), and Carry Flag (CY). For example, if an operation results in a negative value, the Sign Flag is set, while if the result is zero, the Zero Flag is set. In 8086, the PSW includes similar flags but adds the Overflow Flag (OF), which indicates an overflow in signed arithmetic operations.


Write a program to Print pyramid of prime numbers using loops in c?

#include #includevoid main() int prime(int num) { inti,flag; for(i=2;i


What is the program status word and explain it?

This register contains the condition code bits, witch are set by comparison instructions, the CPU priority, the mode (user or kernel), and various other control bits. User programs may normally read the entire Program Status Word but typically may write only some of its fields. The Program Status Word plays an important role in system calls and I/O.


What is the effect of operating different instruction on psw in 8085?

In the 8085 microprocessor, the Program Status Word (PSW) contains important flags that reflect the state of the processor. Different instructions can affect these flags, such as the Zero Flag, Sign Flag, Carry Flag, and Parity Flag. For example, arithmetic operations like addition or subtraction can set or reset these flags based on the result of the operation. Consequently, the PSW is essential for conditional branching and decision-making within programs, as it provides the necessary status information determined by the executed instructions.


An IBM mainframes instruction counter is called?

Program status word or PSW


What does the status bar on a computer program mean?

The status bar on a computer program shows people the process in percentage that the program is almost complete. It also shows the speed and how long until the program is able to be used.


When was the welsh flag granted official status?

nuna buisness i am debo


Do you capitalize flag in Confederate Flag?

Yes.