Question

After running the program below, what will be the values in registers EAX and EBX? mov...

After running the program below, what will be the values in registers EAX and EBX?

mov EAX,0123ABCDh

      mov EBX,4455AABBh

      PUSH BX

      PUSH AX

      POP AX

      POP BX

Question 2 options:

EAX=ABCD 0123 EBX=AABB4455

EAX= ABCD0123 EBX=4455AABB

EAX=0123ABCD   EBX=4455AABB

EAX=ABCD0123    EBX=AABB4455

Homework Answers

Answer #1

Correct Answer:

Explanation:

A stack is a linear data structure in which insertion and deletion operation performed at the top always.

The first two statements load the register EAX and EBX as given below:

EAX = 0123ABCD

EBX = 4455AABB

The register AX and BX have the lower 16 bits of the register EAX and EBX respectively as given below:

AX = ABCD

BX = AABB

The PUSH operation will push the content of the register BX onto the stack, the second PUSH operation push the content of the register AX onto the stack, and the status for the stack after the third instruction will be as given below:

PUSH AX

The fourth instruction POP operation will pop the top element from the stack and load the register AX.

POP AX

The fifth instruction POP operation will pop the top element from the stack and load the register BX.

POP BX

Now, the stack will be empty and the content in the register AX and BX will be as given below:

AX = ABCD

BX = AABB

So, the status of the register EAX and EBX will be as given below:

EAX = 0123ABCD

EBX = 4455AABB

So, only the third option is correct.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
;Assembly x86-64 ;Q9: What is the value of eax (in decimal) after the function call in...
;Assembly x86-64 ;Q9: What is the value of eax (in decimal) after the function call in _start returns? global _start _start: mov edi, 4 call function1 global function1 function1: push rdi inc edi mov esi, 2 call function2 pop rdi mul edi ret global function2 function2: mov eax, edi mov edx, 0 div esi add eax, edi add eax, edx ret ;Q10: A function uses 10 integer arguments. What is the appropriate value for the blank operand to clear the...
7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator...
7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator is used in the procedure definition. 15. What will be the final value in EAX after these instructions execute? push 5 push 6 pop eax pop eax 3. Which instruction pops the stack into the EFLAGS register? 17. Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov eax,30 3: push eax 4: push 40 5:...
In assembly masm use the code below! Write a program that reverse a string using indirect...
In assembly masm use the code below! Write a program that reverse a string using indirect addressing (may not use the stack - push/pop). The string will be given by the user and be up to 64 characters long INCLUDE Irvine32.inc INCLUDE macros.inc MAX = 64 .data source BYTE MAX DUP('#'),0 destination BYTE LENGTHOF source DUP('*'),0 actual_length DWORD ? ask BYTE "Enter a String: ",0 .code main proc ; ask user for input mov edx, OFFSET ask call WriteString ;...
Write a sequence of two instructions that copies bits 0-5 from AL to bits 0-5 in...
Write a sequence of two instructions that copies bits 0-5 from AL to bits 0-5 in BL. Bits 6-7 in BL should be cleared, and AL should be unchanged             Mov al, bl       And 00111111, bl       Write a sequence of two instructions that copies the integer in bits 4-7 from AL register into bits 0-3 of the BL register. Upper 4 bits of AL and BL will be cleared             Shr al, 4       Mov bl,...
13. (True/False): The register list in the USES directive must use commas to separate the register...
13. (True/False): The register list in the USES directive must use commas to separate the register names. 11. (True/False): The USES operator lets you name all registers that are modified within a procedure. 2. Which instruction pushes the 32-bit EFLAGS register on the stack? 18. Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov eax,40 3: push offset Here 4: jmp Ex4Sub 5: Here: 6: mov eax,30 7: INVOKE ExitProcess,0 8:...
phase 2 of binary bomb. what is the loop in assembly? Dump of assembler code for...
phase 2 of binary bomb. what is the loop in assembly? Dump of assembler code for function phase_2: => 0x0000555555555754 <+0>: push %rbp    0x0000555555555755 <+1>: push %rbx    0x0000555555555756 <+2>: sub $0x28,%rsp    0x000055555555575a <+6>: mov %fs:0x28,%rax    0x0000555555555763 <+15>: mov %rax,0x18(%rsp)    0x0000555555555768 <+20>: xor %eax,%eax    0x000055555555576a <+22>: mov %rsp,%rsi    0x000055555555576d <+25>: callq 0x555555555f56 <read_six_numbers>    0x0000555555555772 <+30>: cmpl $0x1,(%rsp)    0x0000555555555776 <+34>: jne 0x555555555781 <phase_2+45>    0x0000555555555778 <+36>: mov %rsp,%rbx    0x000055555555577b <+39>: lea 0x14(%rbx),%rbp...
Consider the program below The initial value of the Stack Pointer ESP = 0018 FF8C. What...
Consider the program below The initial value of the Stack Pointer ESP = 0018 FF8C. What is the value of the STACK POINTER (ESP) after each CALL instruction and each RET instruction below. INCLUDE Irvine32.inc .DATA .CODE main PROC mov ax,val1 call proc1 (1) ESP=____________(After the CALL) nop exit main ENDP proc1 PROC ;Begin Procedure nop call proc2 (2) ESP=____________(After the CALL) nop ret (3) ESP=____________(After the RET) proc1 ENDP proc2 PROC ;Begin Procedure nop call proc3 (4) ESP=___________(After the...
1) Given the code below: What will be the resulting value of the Sign Flag (SF),...
1) Given the code below: What will be the resulting value of the Sign Flag (SF), and the Zero Flag (ZF) and will the Jump occur or will the Jump NOT occur? mov ax,0h cmp ax,0fh js loop1 Question 1 options: SF=1 ZF=0 JUMP WILL NOT OCCUR SF=1 ZF=0 JUMP WILL OCCUR SF=0 ZF=0 JUMP WILL OCCUR SF=0 ZF=1 JUMP WILL NOT OCCUR
x86, 32bit system language question 1. Your stack looks like 0x1050 55 0x1054 57 <- ESP...
x86, 32bit system language question 1. Your stack looks like 0x1050 55 0x1054 57 <- ESP 0x1058 58 You execute push 0x1050 instruction. Stack grows down. How does you stack look like after this instruction? 2. Your stack looks like 0x1050 55 0x1054 57 <- ESP 0x1058 58 You execute pop eax instruction. Stack grows down. What is inside eax and how does you stack look like after this instruction?
Follow the instructions below to create a full running Assembly program: Create a ​WORD ​sized array...
Follow the instructions below to create a full running Assembly program: Create a ​WORD ​sized array with ​5​ elements of ​A2D5h ​using the ​DUP​ operator. Move the ​OFFSET ​of this array into register ​ESI​. Move the number of elements in the array initialized using the ​LENGTHOF​ instruction and move it into ECX as your loop counter. Create a ​LOOP​ that adds the value 1F33h to each element. Traverse through the array by adding the size of each element to the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT