Branching

Lecture 8: Branching

261 Questions205 MCQs51 Short Questions5 Long Questions
Showing 151160 of 261 Questions
Page 16 of 27
Q151🧠 Long Problem📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
Explain the working mechanism, mathematical effect, bit movement, and flag updates of the SHL (Shift Logical Left) instruction in 8088 assembly language.
💻 assembly Snippet
shl ax, 1
mov cl, 3
shl bx, cl
Q152🧠 Long Problem📑 Lec 3MediumHigh-Yield💡Conceptual🌟Starred
Analyze the following 8088 assembly language code sequence and determine what value will be stored in the memory variable 'Find' after execution: ```assembly [org 0x0100] mov cx, [num1] mov ax, 0 l1: add ax, cx sub cx, 1 jnz l1 mov [Find], ax ```
💻 assembly Snippet
[org 0x0100]
mov cx, [num1]
mov ax, 0
l1:
add ax, cx
sub cx, 1
jnz l1
mov [Find], ax
Q153🧠 Long Problem📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual🌟Starred
Analyze the following 8088 assembly language code sequence and determine the values stored in memory variables 'num1' and 'num2', as well as the final contents of registers AX and BX after execution: ```assembly [org 0x0100] mov ax, [num1] mov bx, [num2] add ax, bx sub bx, ax add ax, bx mov ax, 0x4c00 int 0x21 num1: dw 5 num2: dw 10 ```
💻 assembly Snippet
[org 0x0100]
mov ax, [num1]
mov bx, [num2]
add ax, bx
sub bx, ax
add ax, bx
mov ax, 0x4c00
int 0x21
num1: dw 5
num2: dw 10
Q154❓ MCQ📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
Which bitwise bit-rotation instruction rotates the destination operand bits to the right through the Carry Flag (CF)?
💻 assembly Snippet
clc
rcr ax, 1
  1. A.ROR (Rotate Right)
  2. B.RCR (Rotate Through Carry Right)
  3. C.SHR (Shift Logical Right)
  4. D.SAR (Shift Arithmetic Right)
Q155❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When a 32-bit dividend is divided by a 16-bit divisor in 8088 assembly language (using the DIV instruction), what is the bit width of the quotient stored in the AX register?
💻 assembly Snippet
mov dx, 0x0001
mov ax, 0x86A0
mov cx, 1000
div cx
  1. A.32 bits
  2. B.16 bits
  3. C.8 bits
  4. D.4 bits
Q156📝 Short Q📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
Explain what causes a Divide Overflow exception in 8088 assembly language and state which interrupt vector is automatically triggered.
💻 assembly Snippet
mov dx, 0xFFFF
mov ax, 0xFFFF
mov cx, 1
div cx
Q157❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When executing the 8-bit division instruction 'DIV BL', where is the implied 16-bit dividend stored?
💻 assembly Snippet
mov ax, 100
mov bl, 10
div bl
  1. A.AX
  2. B.BX
  3. C.CX
  4. D.DX
Q158❓ MCQ📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
When a division by zero error occurs during the execution of a DIV or IDIV instruction, how is the 'Divide by Zero' interrupt handled by the CPU?
💻 assembly Snippet
mov ax, 10
mov bl, 0
div bl
  1. A.INT 0 instruction must be written in code
  2. B.INT 1 instruction must be written in code
  3. C.INT 2 instruction must be written in code
  4. D.This interrupt is generated automatically by hardware
Q159📝 Short Q📑 Lec 3Easy🔁RepeatedHigh-Yield💡Conceptual
Differentiate between Conditional Jump and Unconditional Jump instructions in 8088 assembly language.
💻 assembly Snippet
jmp target
jz label1
Q160📝 Short Q📑 Lec 3Medium🔁RepeatedHigh-Yield💡Conceptual
Explain Position-Relative Addressing in jump instructions and describe how target addresses are calculated using the Instruction Pointer (IP).
💻 assembly Snippet
jmp short label1