News:

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

Output Non-Zero Terminated String

Started by Astro, August 06, 2009, 12:27:54 AM

Previous topic - Next topic

Astro

Hi,

Maybe a bit of an odd one, but anyway...

How can I print a NON zero-terminated string? In the first byte of my string I have 00 and it of course StdOut thinks it hit the zero terminator and so prints nothing.  ::)  Not useful for my purpose.

I'm struggling to find how to print an arbitrary, non-zero terminated string.

Best regards,
Astro.

dedndave


        .DATA

AString db 0,'Some String'

        .DATA?

hStdOut dd ?
RdWrCnt dd ?

        .CODE

        INVOKE  GetStdHandle,
                STANDARD_OUTPUT_HANDLE
        mov     hStdOut,eax

        INVOKE  WriteFile,
                hStdOut,
                ADDR AString,
                SIZEOF AString,
                ADDR RdWrCnt,
                NULL


Astro

Ahhh! I saw that earlier and wondered.

Thanks!

Best regards,
Astro.

dedndave

btw - the null should appear as a space (white-space character)
255 is also supposed to be a white-space, but some video cards put a centered dot there
i think windows manages character maps, though - so who knows

hutch--

With Windows you check the font used in CHARMAP iof you have it installed, otherwise pinch it from win2000.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php