flat assembler
Message board for the users of flat assembler.

Index > Windows > Numbers

Author
Thread Post new topic Reply to topic
Selevercin



Joined: 14 Mar 2004
Posts: 7
Selevercin 03 Apr 2004, 19:52
Hi everyone.

I asked this question at the end of a thread that died, so I figured I should try it one more time.

If the dl register holds a number in ASCII, how can I turn it into a number? For example, if it holds '3', and I add 10 to it, I get '=' and not 13.

Is it perhaps how I am displaying it? I am using:

ah = 2
int 21h

Thanks for your help!
Post 03 Apr 2004, 19:52
View user's profile Send private message Reply with quote
zenek_tm



Joined: 21 Mar 2004
Posts: 33
Location: Poland
zenek_tm 03 Apr 2004, 21:16
The ascii code for '3' is 33h. So if you want to convert it to value of 3, you should decrease it by 30h.
If you have char '3', which is 33h and add 10 to it, you get 3dh, which is propably the ascii code for '=' (still can't remember the whole ascii table Smile ). And if you want to display number 13, you have to convert it to ascii string '13'. Unless DOS can do that for you. Unfortunatly I'm not that familiar with dos.
Post 03 Apr 2004, 21:16
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Apr 2004, 15:05
as i know DOS can't do it, you must do it yourself Sad
Post 04 Apr 2004, 15:05
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
alonso



Joined: 06 Aug 2003
Posts: 15
alonso 05 Apr 2004, 21:39
The link below has an attachment to a chm (compiled windows help file) with a map of the ascii table their Decimal, hex and binary codes.
http://board.flatassembler.net/topic.php?t=777&highlight=alonso

I Hope that it will help you!! Wink
Post 05 Apr 2004, 21:39
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.