Re: Binary to decimal
From: Phil Carmody (thefatphil_demunged_at_yahoo.co.uk)
Date: 06/10/04
- Previous message: JasmineCorp: "Binary to decimal"
- In reply to: JasmineCorp: "Binary to decimal"
- Next in thread: JasmineCorp: "Re: Binary to decimal"
- Reply: JasmineCorp: "Re: Binary to decimal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 10 Jun 2004 20:25:44 +0300
"JasmineCorp" <webmaster@jasminecorp.net> writes:
> Hi,
>
> I am new to assembly.
>
> I need to convert Qword number stored in a memory location into human
> readable decimal value so that I can print the number to console.
>
> How to do that?
>
> For example
> hex representation of the q word data is
> 3E 5C 63 02 00 00 00 00
>
> Assembly code should convert it to decimal and print 40066110 on the screen.
>
> I am using 16 bit registers.
Yuk!
The easiest method is to load it as an integer into the FPU, and
write it out as BCD. Converting from BCD to decimal is trivial
after that.
Outputting it is OS dependent.
Phil
-- 1st bug in MS win2k source code found after 20 minutes: scanline.cpp 2nd and 3rd bug found after 10 more minutes: gethost.c Both non-exploitable. (The 2nd/3rd ones might be, depending on the CRTL)
- Previous message: JasmineCorp: "Binary to decimal"
- In reply to: JasmineCorp: "Binary to decimal"
- Next in thread: JasmineCorp: "Re: Binary to decimal"
- Reply: JasmineCorp: "Re: Binary to decimal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|