News:

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

Main Menu

easy way to include unicode text in .data secion?

Started by daydreamer, July 07, 2020, 02:01:49 AM

Previous topic - Next topic

daydreamer

testuni dw 041h,03041h,03A5h,04070h,04060h,04050h,04040h,04030h,04020h,04010h
        dw 040f0h,040e0h,040d0h
        dw 040c0h,040b0h,040a0h,04190h,04101h,04102h,04103h,04104h
        dw 0,0,0,0,0,0,0,0,0,0,0

I want to write 16bit unicode in .data sections same way you can write ascii strings in db "test"
like in some other languages supports a 16bit unicode source file

or I need to use some unicode macros to solve it?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

TouEnMasm

I remember that there is some macro Here to do that,but i don't remember where

You are lucky,I am the good one to find that !
http://masm32.com/board/index.php?topic=1796.msg18423#msg18423
Fa is a musical note to play with CL

Vortex

Hi daydreamer,

You can use the WSTR macro to define UNICODE strings :

include     \masm32\include\masm32rt.inc

.data

WSTR        string,"This is a test."

.code

start:

    invoke  crt_wprintf,ADDR string

    invoke  ExitProcess,0

END start

jj2007

@Vortex - to my surprise, this works indeed:
include     \masm32\include\masm32rt.inc

.data

WSTR        string,"Добро пожаловать"

.code

start:

    invoke  crt_wprintf,ADDR string

    invoke  ExitProcess,0

END start

daydreamer

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding