News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Ansii and unicode strings

Started by ragdog, September 23, 2012, 09:19:53 PM

Previous topic - Next topic

ragdog

Hi

How i can use Ansii and Unicode string in my source for ansii and unicode build?

QuoteIFDEF __UNICODE__
WSTR            szProcessName,"Process name"   

ELSE
szProcessName    db "Process name",0

ENDIF

hutch--

Well, how about reading the reference material in the MASM32 SDK, thats what its there for. Multiple systems including advanced macros the qword wrote. There are also examples of how to use these things.

Mikl__

I used macro "du" du macro string
local bslash
bslash = 0
irpc c,<string>
if bslash eq 0
if '&c' eq "/"
        bslash = 1
elseif '&c'gt 127
db ('&c'- 0B0h),4
else
dw '&c'
endif
else
           bslash = 0
           if '&c' eq "n"
           DW 0Dh,0Ah
           elseif '&c' eq "/"
           dw '/'
           elseif '&c' eq "r"
           dw 0Dh
           elseif '&c' eq "l"
           dw 0Ah
           elseif '&c' eq "s"
           dw 20h
           elseif '&c' eq "c"
           dw 3Bh
           elseif '&c' eq "t"
           dw 9
   endif
endif
endm
dw 0
endm
for example wHello: du <Hello, world>