Question: Assembly assignment The Program Final Output: ASM Template: ; Program template .386 .model flat,stdcall .stack 4096 ExitProcess proto,dwExitCode:dword .data msgforward WORD 6 DUP(?) msgbackward WORD

Assembly assignment

Assembly assignment The Program Final Output: ASM Template: ; Program template .386

.model flat,stdcall .stack 4096 ExitProcess proto,dwExitCode:dword .data msgforward WORD 6 DUP(?) msgbackward

WORD 6 DUP(?) restore_esp DWORD ? .code main proc mov restore_esp, esp

; save the contents of register ESP so it can be restored

before the program finishes ; DO NOT REMOVE THIS ; clear the

The Program Final Output:

registers mov eax, 0 mov ebx, 0 mov ecx, 0 mov edx,

ASM Template:

; Program template

.386

.model flat,stdcall

.stack 4096

ExitProcess proto,dwExitCode:dword

.data

msgforward WORD 6 DUP(?)

msgbackward WORD 6 DUP(?)

restore_esp DWORD ?

.code

main proc

mov restore_esp, esp ; save the contents of register ESP so it can be restored before the program finishes

; DO NOT REMOVE THIS

; clear the registers

mov eax, 0

mov ebx, 0

mov ecx, 0

mov edx, 0

mov esi, 0

mov edi, 0

mov esp, 0

mov ebp , 0

; store the message "Welcome Home" in reverse order across the six 16-bit registers

mov ax, "EM"

mov bx, "OH"

mov si, " E"

mov di, "MO"

mov sp, "CL"

mov bp, "EW"

;Phase 1

;Phase 2

;Phase 3

mov esp, restore_esp ; restore register ESP to it's original value so the program can end correctly

; DO NOT REMOVE THIS

invoke ExitProcess,0

main endp

end main

For this programming assignment you should ONLY use the mov instruction (standard/regular move) Operands for instructions should be registers or memory locations. An exception is that you can use the immediate value 0 if you need to clear a register The .data segment should NOT be modified The program has the following initial state in memory: .data msgforward WORD 6 DUP(?) msgbackward WORD 6 DUP(?) For this programming assignment you should ONLY use the mov instruction (standard/regular move) Operands for instructions should be registers or memory locations. An exception is that you can use the immediate value 0 if you need to clear a register The .data segment should NOT be modified The program has the following initial state in memory: .data msgforward WORD 6 DUP(?) msgbackward WORD 6 DUP(?)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!