Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CHANGE THE CODE so that it reads 4 difderent inreger values from the user: N1, N2, N3 and N4. All values may be positive, negative
CHANGE THE CODE so that it reads 4 difderent inreger values from the user: N1, N2, N3 and N4. All values may be positive, negative or zero.
;------------------------------------
include c: \asmio\asm32.inc
includelib c:\asmio\asm32.lib
includelib c:\asmio\user32.lib
includelib c:\asmio\kernel132.lib
.const
NULL = 0
.data?
n1 dword ?
n2 dword ?
.data
Input byte "Enter a number: ", NULL
sumMs byte "N1 + N2 = ", NULL
difMs byte "N1 - N2 = ", NULL
.code
main proc
mov edx, OFFSET Input
call WriteString
call readInt
mov n1, eax
mov edx, OFFSET Input
call WriteString
call readInt
mov n2, eax
add eax, nl
call crLf
mov edx, OFFSET sumMs
call WriteString
call writeInt
mov eax, n1
mov eax, n2
call crLf
mov edx, OFFSET difMs
call WriteString
call WriteInt
call readInt
ret 0
main endp
end main
;-------------------------------------
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started