W3 part 1 - adden1 SDWORD ? ;adden2 SDWORD ? sum SDWORD ? s...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
TITLE subtract three integers (main.asm) ( ; Description: ; Assignment 3 part 1 ; Write a program that clears the screen, locates the cursor near the ; middle of the screen, prompts the user for two integers, adds the ; integers, and displays their sum. ; You will need to use the ClrScr, Gotoxy, WriteString, Crlf, and ; ReadInt procedures from the Irvine32 library. ; ; Revision date: Oct 9th 2008 ; INCLUDE Irvine32.inc I .data
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: adden1 SDWORD ? ;adden2 SDWORD ? sum SDWORD ? s .code main PROC m call Clrscr mov dh,8 mov dl,40 call Gotoxy call ReadInt mov adden1, eax mov dh,9 mov dl,40 call Gotoxy call ReadInt mov sum, eax ;Move 2nd value directly into sum. mov eax, adden1 add sum, eax mov dh,10 mov dl,40 call Gotoxy ;mov eax, sum ;call WriteInt mov edx,OFFSET sum call WriteString call Crlf c exit main ENDP END main...
View Full Document

This note was uploaded on 12/30/2009 for the course COS 231 taught by Professor Jasonlitz during the Summer '09 term at Thomas Edison State.

Ask a homework question - tutors are online