Write a program in assembly language that will read in 4 integers and compute (A
ID: 3566806 • Letter: W
Question
Write a program in assembly language that will read in 4 integers and compute (A - B + C - D). Print out the integers with the result.
--I'm not sure if I'm doing my arithmetic properly (most likely not) but I don't know how to output correctly so I'm not sure how to check it. Any help with this would be appreciated.
.data
myMessage BYTE "Please enter 4 integers:",0dh,0ah,0
ResultMsg BYTE "Result: ",0
Num1 DWORD ?
Num2 DWORD ?
Num3 DWORD ?
Num4 DWORD ?
.code
main PROC
call Clrscr
mov edx,OFFSET myMessage
call WriteString
call ReadInt
mov Num1, eax
call ReadInt
sub eax, Num2
call ReadInt
add Num3, eax
Call ReadInt
sub Num4, eax
mov edx,OFFSET ResultMsg
call WriteString
call WriteInt
call CRLF
exit
main ENDP
END main
Explanation / Answer
you can try this one..
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.