Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m having trouble making another code to display my project 1 and my name just

ID: 3732187 • Letter: I

Question

I'm having trouble making another code to display my project 1 and my name just how the assignment is show to do if anyone can help me thank you. And they gave me the program already but they want us to add more to it which I dont know what to use.

; Example assembly language program -- adds two numbers
; Author: R. Detmer
; Date: 1/2008

.586
.MODEL FLAT

INCLUDE io.h ; header file for input/output

.STACK 4096

.DATA
number1 DWORD ?
number2 DWORD ?
prompt1 BYTE "Enter first number", 0
prompt2 BYTE "Enter second number", 0
string BYTE 40 DUP (?)
resultLbl BYTE "The sum is", 0
sum BYTE 11 DUP (?), 0

.CODE
_MainProc PROC
input prompt1, string, 40 ; read ASCII characters
atod string ; convert to integer
mov number1, eax ; store in memory

input prompt2, string, 40 ; repeat for second number
atod string
mov number2, eax
  
mov eax, number1 ; first number to EAX
add eax, number2 ; add second number
dtoa sum, eax ; convert to ASCII characters
output resultLbl, sum ; output label and sum

mov eax, 0 ; exit with return code 0
ret
_MainProc ENDP
END ; end of source code

Original Program The original program displays two message boxes, asking for two numbers The program adds them Then the program displays the result in another message box. Enhanced Program Enhance program windows32 to include the two extra message boxes as shown here: The first one displays at the beginning of the program. It shows Project 1 as title and your full name inside the message box. The second message box is displayed at the end of the program. It displays End of Project 1 and your full name inside the message box.

Explanation / Answer

Please add the extra lines that are underlined and execute the program.

; Example assembly language program -- adds two numbers
; Author: R. Detmer
; Date: 1/2008

.586
.MODEL FLAT

INCLUDE io.h ; header file for input/output

.STACK 4096

.DATA
number1 DWORD ?
number2 DWORD ?

resultLbl0 STRING “Project1”,0

output resultLbl0, yourname     ;REPLACE YOUR NAME HERE
prompt1 BYTE "Enter first number", 0
prompt2 BYTE "Enter second number", 0
string BYTE 40 DUP (?)
resultLbl1 BYTE "The sum is", 0

resultLbl2 STRING “End of Project1”,0
sum BYTE 11 DUP (?), 0

.CODE
_MainProc PROC
input prompt1, string, 40 ; read ASCII characters
atod string ; convert to integer
mov number1, eax ; store in memory

input prompt2, string, 40 ; repeat for second number
atod string
mov number2, eax
  
mov eax, number1 ; first number to EAX
add eax, number2 ; add second number
dtoa sum, eax ; convert to ASCII characters
output resultLbl1, sum ; output label and sum

        output resultLbl2, yourname         ; REPLACE YOUR NAME HERE

mov eax, 0 ; exit with return code 0
ret
_MainProc ENDP
END ; end of source code

               

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote