Q.1 Explain why each of the following statements are invalid: .data Val BYTE 100
ID: 3817853 • Letter: Q
Question
Q.1 Explain why each of the following statements are invalid:
.data
Val BYTE 100
Val2 BYTE ?
wVal WORD 2
dVal DWORD 5
Num1 WORD ?
Num2 WORD ?
.code
movsx wVal,bl
xchg Val,Val2
add ds,10
mov 25,Val
mov eip,Val
add Num1, Num2
mov cs,45
mov esi,wVal
mov Val2,Val
xchg ax, 25
Q.2 Use the following variable definition (50 points)
.DATA
var1 SBYTE -4,-2,3,1
var2 WORD 1000h, 2000h, 3000h, 4000h
var3 SWORD -16, -42
var4 DWORD 1,2,3,4,5
What will be the value of the destination operand after each of the following instructions
execute in sequence?
mov al,var1
mov ah, [var1+3]
mov ax, var2
mov ax, [var2+4]
mov ax, var3
mov ax,[var3-2]
mov edx, var4
movzx edx, var2
mov edx,[var4+4]
movsx edx, var1
Explanation / Answer
Ans 1- The following statements are invalid becoz we are not allowed to use any special symbol(_ underscore is allowed only) , digit or space among variable name.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.