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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED HELP WITH ADDING 2 NUMBERS

Status
Not open for further replies.

glogic

Programmer
Nov 8, 2001
15
IE
HI I KNOW THAT THIS IS HANDY TO EVERYONE ELSE BUT I DONT KNOW WHAT I AM DOING WRONG.. I AM ADDING TWO NUMBERS FROM AX AND BX AND RESULT IN AX AND WHEN THE ANSWER IS BELOW 10 IT OUTPUTS THE ANSWER FINE BUT WHEN THE ANSWER IS 10 OR OVER IT GOES MAD ON ME.. PLEASE HELP
G
 
Hello,

What you are probably doing is something like
add ax,bx and then add ax,'0' to make it a number. If ax contains 10, then you will get the character :
So, what you have to do is make sure that AX contains less then 10 before adding the '0'.
Wouter Dijkslag

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top