Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to code a calculator in assembly

Status
Not open for further replies.

netwrq

Programmer
Sep 23, 2003
1
US
Hello... I am in dire help here. I am having troubles figuring out how to code my calculator. The problems are inputing a number into the calculator and outputting the TOTAL SUM. If anyone can figure this out, I will greatly apreciate it.

Thanks
Yahia Hegazy
 
Try using the DOS service interrupts for input and output.
For example, for buffered input:
Code:
ax=0ah,ds:dx=seg:offset of buffer.
int 21h
For output:
Code:
ah=09,ds:dx=seg:offset of output string.
int 21h
The thing to worry about here is the conversion between the characters input to the numbers used in the registers. Conversion to BCD might be easier for output. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top