Re: newb TASM user needs help

From: R.Wieser (rwieser-killthis-_at_xs4all.nl)
Date: 12/06/03


Date: Sat, 6 Dec 2003 13:06:25 +0100

xteven <stevedool@yahoo.com> schreef in berichtnieuws
Xns9449D079162EnewbTASMuserneedshel@207.69.154.205...

Hello xteven,
[Snip]

> I understand exactly what you are saying... But since I
> am kinda new I still dont know a few things. I give a
> binary value to variable. How do I convert and print
> out the decimal of it? Lets say I give a variable the
> binary value of 15 which is 00001111, it prints out
> the ASCII char of 15. What I am asking is, how
> do I print out the decimal value of a binary rather
> than the ASCII char of the binary.

Well, that's quite simple actually, especially when dealing with such a
small number (one byte, three decimal digits).

What do you think of dividing the number by 100, converting the result (0
thru 2) to ASCII (add the value of the character "0" to it), and send the
resulting character ("0" thru "2")to the screen. After you've done that,
you can divide the rest by 10, and display both that result, and the rest of
that division ...

Regards,
  Rudy Wieser



Relevant Pages

  • Re: Convert Ascii Character to decimal
    ... Is it sending over a character or a byte? ... I do not answer questions on behalf of my employer. ... programmer helping programmers. ... > ASCII Char 'NUL' will become 0 ...
    (microsoft.public.dotnet.general)
  • Convert Ascii Character to decimal
    ... I am reading from a serial port from a device which sends over an ascii ... It uses the full extended 256 character set and therefore has ... ASCII Char 'NUL' will become 0 ...
    (microsoft.public.dotnet.general)
  • Re: String Manipulation Func
    ... What is the Ascii char for this one? ... printing character, but it could also be a character from a script, ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.programming)
  • Re: How to eliminate CR (carriage return) character
    ... but we get also the CR (carriage return) character (ascii char 13). ...
    (microsoft.public.vc.language)