Use the following variable definition for questions 4 6 Var

Use the following variable definition for questions 4 - 6 Var1 db -4, -2, 3, 1 Var2 dw 1000h, 2000h, 3000h, 4000h For each of the following statements, state whether or not the instruction is valid: MOV al, var1 MOV ah, var2 MOV var2, al MOV ds ax What will be the hexadecimal value of destination operand after each of the following instructions execute in sequence? MOV al var1 MOV ah, [var1 3] What will be the value of destination operand after each of the following instructions execute in sequence? MOV ax, var2 MOV ax, [var2 + 2]

Solution

4. a) mov al, var1 - it is not valid (var1 ust have variables of same size).

b) mov ah, var2 - valid

c) mov var2, al - not valid (destination must alwaysbe register)

d) mov ds, ax - valid

5. a) mov al, var1 - 0fch (i.e. -4 in hexadecimal)

b) mov ah, [var1+3] - 01h(i.e. when var1 in 0th position is added with 3, it points to 1)

6. a) mov ax, var2 - 1000h

b) mov ax, [var2+2] - 3000h

 Use the following variable definition for questions 4 - 6 Var1 db -4, -2, 3, 1 Var2 dw 1000h, 2000h, 3000h, 4000h For each of the following statements, state w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site