Question1: Assume that array 1 is located at offset address 0120. As each instru
ID: 3594109 • Letter: Q
Question
Question1: Assume that array 1 is located at offset address 0120. As each instruction is executed, fill in the value of the operand listed on the right side:
mov ax, @data
mov ds, ax
mov ax, ptr1 ; a. AX =
mov bx, array1 ; b. BX =
xchg ax, bx ; c. AX =
sub al, 2 ; d. AX =
mov ptr2, bx ; e. ptr2 =
.data
array1 dw 10h, 20h
ptr1 dw array1
ptr2 dw 0
Question 2:
Assume that val1 is located at offset 0120h and that ptr1 is located at offset 0122h. as each instruction is executed, fill in the value of the operand listed on the right side:
.code
mov ax, @data
mov ds, ax
mov ax, 0
mov al, byte ptr val1 ; a. AX =
mov bx, ptr1 ; b. BX =
xchg ax, bx ; c. BX =
sub al, 2 ; d. AX =
mov ax, offset ptr2 ; e. AX =
.data
val1 dw 3Ah
ptr1 dw val1
ptr2 dw ptr1
Explanation / Answer
Question 1:
mov ax, @data
mov ds, ax
mov ax, ptr1 ; a. AX = 10h
mov bx, array1 ; b. BX = 10h
xchg ax, bx ; c. AX = 10h
sub al, 2 ; d. AX = Eh (10h - 2 = 16-2 = 14 = Eh)
mov ptr2, bx ; e. ptr2 = Eh
Question 2:-
.data
array1 dw 10h, 20h
ptr1 dw array1
ptr2 dw 0
Question 2:
.code
mov ax, @data
mov ds, ax
mov ax, 0
mov al, byte ptr val1 ; a. AX = 3Ah
mov bx, ptr1 ; b. BX = 3Ah
xchg ax, bx ; c. BX = 3Ah
sub al, 2 ; d. AX = Eh
mov ax, offset ptr2 ; e. AX = 3Ah
.data
val1 dw 3Ah
ptr1 dw val1
ptr2 dw ptr1
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.