Assembly Programming Language Quiz 2

Description: Assembly Programming Language Quiz 2
Number of Questions: 8
Created by:
Tags: assembly
Attempted 0/8 Correct 0 Score 0

What is the value of over flow (O) flag after the instruction: SUB AX,AX

  1. Set

  2. Cleared

  3. Unknown

  4. none of the above


Correct Option: B

The operating system functions:

  1. System boot

  2. Running applications

  3. Both wrong

  4. Both correct


Correct Option: D
Explanation:

To solve this question, the user needs to have basic knowledge about operating systems and their functions.

Now, let's go through each option and explain why it is right or wrong:

A. System boot: This option is correct. One of the main functions of an operating system is to manage the boot process of a computer. When a computer is turned on, the operating system is responsible for loading and initializing the necessary components to start the system.

B. Running applications: This option is also correct. Another important function of an operating system is to manage and run applications on a computer. The operating system provides resources and services to enable applications to execute and interact with the hardware and other software components.

C. Both wrong: This option is incorrect. Both option A and option B are correct, as explained above.

D. Both correct: This option is correct. Both option A (System boot) and option B (Running applications) accurately describe functions performed by an operating system.

C. Both wrong: This option is incorrect. Both option A and option B are correct, so this option is not the correct answer.

D. Both correct: This option is incorrect. While both option A and option B are correct, this option does not accurately describe the functions of an operating system. It is more accurate to say that an operating system performs a wide range of functions, including system boot and running applications.

The Answer is: D

What about the Stack segment in .COM program during execution:

  1. Must be defined explicitly in the program

  2. DOS uses the high area of the COM program for the Stack

  3. There is no stack for .COM program during execution

  4. none of the above


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Must be defined explicitly in the program - This option is incorrect because the stack segment in a .COM program does not need to be defined explicitly in the program.

Option B) DOS uses the high area of the COM program for the Stack - This option is correct. In a .COM program, the stack segment is located in the high area of the program's memory. DOS uses this high area for the stack during program execution.

Option C) There is no stack for .COM program during execution - This option is incorrect. A stack is an essential component of program execution, and even .COM programs have a stack segment.

Option D) none of the above - This option is incorrect because option B is the correct answer.

The correct answer is B) DOS uses the high area of the COM program for the Stack. This option is correct because the stack segment in a .COM program is located in the high area of the program's memory, and DOS utilizes this area for the stack during program execution.

The physical address 12345 can be represented by the logical address:

  1. 1234:5

  2. 1230:45

  3. Both (a) and (b) are wrong

  4. Both (a) and (b) are correct


Correct Option: D

AI Explanation

To answer this question, we need to understand the concepts of physical address and logical address.

A physical address is the actual location of a specific block of data in the physical memory. It is represented by a unique number or address.

A logical address, on the other hand, is an address that is generated by the CPU and used by the CPU to access memory. It does not correspond directly to the physical address. The logical address is translated to a physical address by the memory management unit (MMU) in the CPU.

In the given question, the physical address is 12345. We need to determine the corresponding logical address.

Option A) 1234:5 - This option is incorrect because it represents the logical address as 1234:5. The correct format for a logical address is usually segment:offset, where segment represents a segment of memory and offset represents the distance from the start of the segment to the desired data. The given option does not follow this format.

Option B) 1230:45 - This option is incorrect because it also does not follow the correct format for a logical address.

Option C) Both (a) and (b) are wrong - This option is incorrect because option B is incorrect, but option A is correct. Option A represents the logical address as 1234:5, which is a valid format for a logical address.

Option D) Both (a) and (b) are correct - This option is correct because option A represents the correct logical address format of 1234:5.

Therefore, the correct answer is option D.

You want to initialize the IP register with the value 2000:

  1. Mov IP,2000

  2. Jmp 2000

  3. Mov 2000,IP

  4. You can not change IP register


Correct Option: B

The maximum memory space addressable by 8086 processor was:

  1. 64 KB

  2. 640KB

  3. 1MB

  4. 2MB


Correct Option: C

AI Explanation

To answer this question, we need to understand the memory addressing capabilities of the 8086 processor.

The 8086 processor is a 16-bit processor, which means it can address a maximum of 2^16 (or 64KB) memory locations directly. However, the 8086 processor supports a memory segmentation mechanism that allows it to access more memory.

In the case of the 8086 processor, the memory is divided into segments of 64KB each. These segments can overlap, allowing the processor to address a total of 2^20 (or 1MB) memory locations.

Therefore, the correct answer is option C) 1MB. This option is correct because the 8086 processor can address a maximum of 1MB of memory using its memory segmentation mechanism.

What is the value of AX register after executing, MOV AX,456h, CMP AX,456h

  1. 456h

  2. Zero

  3. 1

  4. Unknown


Correct Option: A
Explanation:

To solve this question, the user needs to understand the MOV and CMP assembly instructions.

MOV is a transfer instruction that moves data from a source operand to a destination operand. In this case, the source operand is the immediate value 456h, and the destination operand is the AX register. This instruction copies the value 456h into the AX register.

CMP is a comparison instruction that compares two operands and sets the appropriate flags in the flags register based on the result of the comparison. In this case, the operands are the AX register and the immediate value 456h. This instruction subtracts the value of the immediate operand from the value of the AX register and sets the appropriate flags based on the result.

Now, let's go through each option and explain why it is right or wrong:

A. 456h: This option is correct. The MOV instruction moves the value 456h into the AX register, so the AX register contains the value 456h. The CMP instruction does not modify the value of the AX register.

B. Zero: This option is incorrect. The MOV instruction moves the value 456h into the AX register, so the AX register contains the value 456h. The CMP instruction does not modify the value of the AX register.

C. 1: This option is incorrect. The CMP instruction does not affect the value of the AX register, so the value of the AX register remains 456h.

D. Unknown: This option is incorrect. The MOV instruction moves the value 456h into the AX register, so the value of the AX register is known to be 456h. The CMP instruction does not modify the value of the AX register.

Therefore, the answer is: A. 456h

  1. INC AX

  2. INC AL INC AH

  3. both (a) and (b) are correct

  4. both (a) and (b) are wrong


Correct Option: B
- Hide questions