Question: Write a program in Assembly MASM that: 1 . Clears the screen, locates the cursor near the middle of the screen. 2 . Prompts the
Write a program in Assembly MASM that:
Clears the screen, locates the cursor near the middle of the screen.
Prompts the user for two signed integers.
Displays their sum and difference.
Repeats the same steps three times. Clears the screen after each loop iteration.
You might need to call the following procedures from irvine library:
ClrScr
WriteString
WriteInt
ReadInt
Crlf
ReadChar
Gotoxy
The Gotoxy procedure locates the cursor at a given row and column in the console window. By default, the console windows Xcoordinate range is to and the Ycoordinate range is to When you call Gotoxy, pass the Ycoordinate row in DH and the Xcoordinate column in DL Sample call:
mov dh ; row
mov dl ; column
call Gotoxy; locate cursor
You need to create the following procedures:
Locate. It needs to be called before anything displays on the screen. Where it sets the cursor position. Input: this procedure prompts the user and saves the input.
DisplaySum: calculates and displays the sum.
DisplayDiff: calculates and displays the difference. first input the second input
WaitForKey; It needs to be called at the end of each iteration. It displays "Press any key..." and waits for an input
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
