Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

The Program Final Output:

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

How would you establish the value of learning this material?

Answered: 1 week ago

Question

1. Discuss the four components of language.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago