Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the following variable definition for questions 4-6 Var db -4, -22, 3, 1 var

ID: 3811305 • Letter: U

Question

Use the following variable definition for questions 4-6 Var db -4, -22, 3, 1 var2 dw 1000h, 2000h, 3000h, 4000h 4. For each of the following statements, state whether or not the instruction is valid: a. MOV al, var1 b. MOV ah, var2 C. Mov var 2, al d. MOV ds, ax 5. What will be the hexadecimal value of destination operand after each of the following instructions execute in sequence? a. MOV al, var1 b. MOV ah, (var1 3] 6. What will be the value of destination operand after each of the following instructions execute in sequence? a. MOV ax, var2 b. Mov ax, Ivar 2 2) 7, Convert the following C program to x86 assembly code. Use 8086 instruction set. define count 2 int y [21; int main (void) int A B; A 5; B m 6; y [0] A B count i y 11 B count return (0)

Explanation / Answer

4.
a) Yes // ; based operand
b) yes //based operand (MOV AH, ??H First of all, the AH refers to the "high" side of the AX register. The brother of this would be AL which refers to the "low" side of the AX register. This is used when you want to perform commands against 8 bits instead of 16 bits. The second part of this, the ??H as you refer to it is the value you want to store in the AH register. The H at the end means "hexadecimal". So if you have 00H that would mean zero (in hex). If you put in FFH that would be the same as 255 in decimal number system.)
c) No
d) yes // will set memory location as the variable DS which is a standard variable (or register in this case) for 8086 assembly.

5.
a) yes // based operand
b) yes //based operand with constant displacement ( MOV AH, ??H First of all, the AH refers to the "high" side of the AX register. This is used when you want to perform commands against 8 bits instead of 16 bits. The second part of this, the ??H as you refer to it is the value you want to store in the AH register. The H at the end means "hexadecimal". So if you have 00H that would mean zero (in hex). If you put in FFH that would be the same as 255 in decimal number system.)

6.
a) yes // MOV AH, ??H First of all, the AH refers to the "high" side of the AX register. The brother of this would be AL which refers to the "low" side of the AX register. This is used when you want to perform commands against 8 bits instead of 16 bits. The second part of this, the ??H as you refer to it is the value you want to store in the AH register. The H at the end means "hexadecimal". So if you have 00H that would mean zero (in hex). If you put in FFH that would be the same as 255 in decimal number system.
b) yes // based operand with constant displacement

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote