Traci R.

asked • 04/03/21

can you modify the program below to prompt for 3 numbers, calculate the sum, and output the result. Include your entire source code. If possible show a screen shot of your output.?

.586

.MODEL FLAT

.STACK 4096 ; reserve 4096-byte stack

.DATA ; reserve storage for data

number DWORD -105 ; a dowrd location labeled "number" contains a value of -105

sum DWORD ? ; a dword location "sum" with contents undefined

.CODE ; start of main program code

main PROC

  mov eax, number ; contents of "number" to EAX

add eax, 158 ; add 158

mov sum, eax ; sum in eax is trasfered to memory at "sum"

mov  eax, 0 ; exit with return code 0

ret

main ENDP

END  ; end of source code


1 Expert Answer

By:

Patrick B. answered • 04/03/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.