News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

hex to ascii again

Started by ragdog, November 15, 2009, 07:41:30 PM

Previous topic - Next topic

ToutEnMasm

Quote
yah - but you can call it twice   
:bdg
you have to made a proc only for that.
Try it.

dedndave

that's the fun part about working with ASCII hex   :P
you don't have to worry about base conversion (i.e. no carry or borrow)
if you want to make a "qw2hex" proc, just be sure to do the high dword first   :U

dedndave

        .XCREF
        .NOLIST
        INCLUDE    \masm32\include\masm32rt.inc
        .LIST

;--------------------------------------------------------------

        .DATA
        ALIGN   4

dqValue dq 0ABCDEF9876543210h

;------------------------------------

        .DATA?
        ALIGN   4

bBuffer db 17 dup(?)

;--------------------------------------------------------------

        .CODE

_main   PROC

        INVOKE  dw2hex,dword ptr dqValue+4,offset bBuffer
        INVOKE  dw2hex,dword ptr dqValue,offset bBuffer+8
        print   offset bBuffer
        print   chr$(13,10)
        inkey
        exit

_main   ENDP

;--------------------------------------------------------------

        END     _main