Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

1. This is 80x86 assembly language. Starting with the windows32 project, modify the example program given in this section to prompt for, input and add

1. This is 80x86 assembly language. Starting with the windows32 project, modify the example program given in this section to prompt for, input and add three numbers, and display the sum. Run the program several times with different data. Trace execution using the debugger.image text in transcribed

Example assembly language program -- adds two numbers Author R. Detmer Date: 6/2013 586 MODEL FLAT INCLUDE io.h ; header file for input/output STACK 4096 DATA numberl DWORD ? number2 DWORD ? prompt1 BYTE "Enter first number", 0 prompt2 BYTE "Enter second number", 0 string BYTE resultLbl BYTE "The sum is", 0 sum 40 DUP (?) BYTE 11 DUP ?), 0 CODE MainProc PROC input prompti, string, 40 atod string mov ; read ASCII characters ; convert to integer numberl, eax store in memory ; repeat for second number input prompt2, string, 40 atod string mov number2, eax mov add dtoa output eax, numberl eax, number2 sum eax resultLbl, ; first number to EAX ; add second number ; convert to ASCII characters sumoutput label and sunm eax, 0 exit with return code 0 mov ret MainProc ENDE END ; end of source code Example assembly language program -- adds two numbers Author R. Detmer Date: 6/2013 586 MODEL FLAT INCLUDE io.h ; header file for input/output STACK 4096 DATA numberl DWORD ? number2 DWORD ? prompt1 BYTE "Enter first number", 0 prompt2 BYTE "Enter second number", 0 string BYTE resultLbl BYTE "The sum is", 0 sum 40 DUP (?) BYTE 11 DUP ?), 0 CODE MainProc PROC input prompti, string, 40 atod string mov ; read ASCII characters ; convert to integer numberl, eax store in memory ; repeat for second number input prompt2, string, 40 atod string mov number2, eax mov add dtoa output eax, numberl eax, number2 sum eax resultLbl, ; first number to EAX ; add second number ; convert to ASCII characters sumoutput label and sunm eax, 0 exit with return code 0 mov ret MainProc ENDE END ; end of source code

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_2

Step: 3

blur-text-image_3

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students explore these related Databases questions

Question

What is DDL?

Answered: 3 weeks ago