Which of the following flags remaining undefined after the execution of instruction AAD (ASCII adjust after division) in the 8086 microprocessor ?
Carry flag
AAD leaves the carry flag undefined — option 1 — while it does set the sign, zero and parity flags meaningfully.
| Flag | After AAD |
|---|---|
| CF — carry | Undefined |
| SF — sign | Set from the result |
| ZF — zero | Set from the result |
| PF — parity | Set from the result |
| AF, OF | Undefined |
What AAD actually does. Despite its name, it runs before a division, not after. Unpacked BCD keeps one decimal digit per byte, so a two-digit number sits as a tens digit in AH and a units digit in AL. Ordinary DIV works on a binary value, so the two digits must first be combined:
\(AL\leftarrow\left(AH\times10\right)+AL,\qquad AH\leftarrow0\)
After that the pair is an ordinary binary number in AL and DIV can be used normally.
Why the carry is meaningless here. The largest value AAD can produce is
\(9\times10+9=99\)
which fits comfortably in a byte, so no carry out of bit 7 can ever occur in a legitimate use. The instruction's internal multiply-and-add simply leaves CF holding whatever the microcode happened to produce, and Intel documents it as undefined rather than guaranteeing a value. Testing it after AAD is therefore a programming error, however consistently one particular processor might behave.
Why SF, ZF and PF are defined. They describe the byte now in AL, which is a genuine result: SF is its bit 7, ZF records whether it is zero, PF its even parity. A program can legitimately act on those — checking ZF to detect a zero dividend, for instance.
The companion instructions follow the same pattern and are worth knowing together: AAA and AAS adjust after addition and subtraction, AAM adjusts after multiplication by splitting AL back into two unpacked digits, and DAA and DAS do the equivalent job for packed BCD, where two digits share one byte.
Hence, the flag left undefined is the carry flag.
Given below are two statements :
Statement I : In 8051 micro-controller register banks and stack reserves 32 bytes from locations 00 to 1F Hex
Statement II : Bit-Addressable RAM locations are 20 H to 2 F H.
In the light of the above statements, choose the most appropriate answer from the options given below :
Find the delay generated by Timer 0 in the following code of 8051 microcontroller : clock period = 1.085 µs.
MOV TMOD, #01H
MOV TLO, #3DH
MOV THO, #0A2H.
SET B TRO
Loop : J N B TFO, LOOP
CLR TRO
CLR TFO
In "JZ Next" instruction of 8051 microcontroller, which register's content is checked to see if it is zero?
Using 8051 assembly language programming numbers 54 H and 98 H are added. After addition the status of CY, AC and P flags are respectively:
In 8051 microcontroller, one machine cycle lasts in 12 oscillation period. Crystal oscillator's frequency is 11.0592 MHz. Find how long it takes to execute instruction MOV R4, # 25.
Advantage of segmented memory in 8086 is
A. Allows the memory capacity to be 1M byte, although the actual address is of 16 bit size.
B. Allows the placing of code and data portions of the same program in different parts of memory.
C. Allows the memory capacity to be 2M byte, although the actual address is of 16 bit size.
D. Allows the placing of code and data portion of the same program in same parts of memory.
E. Allows the memory capacity to be 1M byte, although the actual address is of 20 bit size
Choose the correct answer from the options given below :
Which of the following statements are correct for a microcontroller ?
A. A microcontroller has on-chip I/O ports
B. A microcontroller has a fixed amount of RAM on the chip
C. The flag register in the 8051 is called program standard word
D. Auxiliary carry flag is set when there is a carry from D3 to D4 during an ADD or SUB operation
E. Overflow flag is only used to detect errors in unsigned arithmetic operations.
Choose the correct answer from the options given below :
Match List I with List II
| LIST I (instruction of 8051 microcontroller) | LIST II (Addressing mode) | ||
|---|---|---|---|
| A. | MOV A, # 32 H | I. | Register addressing mode |
| B. | MOV R 6, A | II. | Register Indirect addressing mode |
| C. | MOV R4, 7 FH | III. | Immediate Addressing mode |
| D. | MOV A, @ RO | IV. | Direct Addresing mode |
Choose the correct answer from the options given below:
The ALE line of an 8085 microprocessor is used to
Contents of ‘A’ register after execution of the following 8085 microprocessor program is
MVI A, 55 h
MVI C, 25 h
ADD C
DAA
Register which is used to store values of arithmetic and logical operations is termed:
How many bytes of bit addressable memory is present in 8051 based microcontrollers?
A single instruction to clear the lower four bits of the accumulator in 8085 assembly language is-
In Microprocessor 8085 Address/Data buffer is a/an _______ buffer.
Microprocessor 8085 operates on a clock cycle with ______ duty cycle.