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
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started