7. In the following set of instructions, what value gets moved into EAX?
.data
IntArray
WORD32
DUP(0)
.code
MOV
eax,SIZEOF
IntArray
EAX =
7. In the following set of instructions, what value gets moved into EAX? .data IntArray WORD32...
Given the following data and code, what is the hexadecimal value of register eax .data array1 WORD 10 DUP(?), 0, 0 .code mov eax, SIZEOF array1 a. 20 b. 21 c. 22 d. 24
Assembly language: Before executing the following code, the value in eax was 1 What will be the value in eax after executing the following code: mov ebx, eax shl eax, 4 shl ebx, 3 add eax, ebx
mov ecx, 5 L1: add eax, 2 loop L1 3. What is the final value of myNum? Show your work. [5 points .data myNum BYTE 10h, 20h .code Increment PROC add eax, FFh ret Increment ENDP main PROC movzx eaxX, myNum call Increment mov myNum, al main ENDP
4. The following code fragments show a sequence of virus instructions and a metamorphic version of the virus. Briefly describe the effect produced by the metamorphic code. We were unable to transcribe this imageThe following code fragments show a sequence of virus instructions and a metamorphic version of the virus. Briefly describe the effect produced by the metamorphic code. Original Code Metamorphic Code mov eax, 5 add eax, ebx call (eax] mov eax, 5 push ecx pop ecx add eax,...
1. What will be the value in EDX after each of the lines marked (a) and (b) execute? .data one WORD 8002h two WORD 4321h code mov edx,213480411h movsx edx,one (a) movsx edx,two ; (b) 2. What will be the value in EAX after the following lines execute? mov eax,1002FFFFh inc ax 3. What will be the value in EAX after the following lines execute? mov eax,30020000h dec ax 4. What will be the value in EAX after the following...
) Identify the hexadecimal value moved to the destination by each of the following instruction below based on the given data declaration. Assume that the offset of byteVal is 00000000H data byteVal wordVal dwordVal aString BYTE 1,2,3,4 WORD 1000H,2000H,3000H,4000H DWORD 12345678H,34567890H BYTE "ABCDEFG",0 ax,offset byteVal i. mov dx,wordVal i. mov al,aString+2 i11. mov dx,wordVal+4 iv. mov mov eax,offset byteVal+2 V. CO2 (10 marks) d) The incomplete program below used to find the multiplication product of the given numbers by 4...
Assembly Language NASM create a substring ASSIGNMENT INSTRUCTIONS: Create the Substring from the Given string, beginIndex and endIndex The program should create a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex – 1. Thus the length of the substring is endIndex-beginIndex. In other words you can say that beginIndex is inclusive and endIndex is exclusive while getting the substring. Initialize the following values in...
.MODEL FLAT INCLUDE io.h i header file for input/output STACK 4096 .DATA word1 word 1234 result byte 6 dup(?), e .CODE MainProc PROC wtoa result, word1 exit with return code e mov eax, ret MainProc ENDP END Assume you set a break point in ret statement and look at the memory that starts from the address of result. Write what your expect to see in the next 6 bytes starting from result. .MODEL FLAT INCLUDE io.h i header file for...
4. Complete the following table using only hexadcimal numbers in the table P=((((2+7+5) *743) *7-1)*7 + 4) *7-2 ASSEMBLY LANGUAGE PSEUDO-CODE AL PSEUDO-CODE PEAXX mov x7 mov p. EAX:= P mov eax, p mul x add eax,5 mov p. eax mov eax. p mul x add eax, 3 mov p, eax EAX:= EAX + 5 P := P*X + 3 EAX:= P EAX: EAX*X EAX:= EAX + 3 P:= EAX
6. What will be the final value in EDX after this code executes? mov edx, 1 mov eax,7FFFh cmp eax,0FFFF8000h jl L2 mov edx,0 し2: 7. (True/False): The following code will jump to the label named Target. mov eax,-30 cmp eax,-50 ig Target 8. Implement the following pseudocode in assembly language. Use short-circuit evaluation and assume that vall and X are 32-bit variables. if vall >ecx ) AND (ecx> edx) X=1 else X=2;