Due to the NT os' finiky way of doing things, the macro was revised to align on a DWORD boundry. The following is the revised code:
Since i was revising it, I also made it simpler to use. It has two modes of operation.
Or for longer static unicode strings that may take multiple lines:
Simple enough?
:alright:
NaN
;==============================================================
; E-Z Unicode By NaN, 2002 Rev 1.1
;==============================================================
LL macro btext
LOCAL cnt, va, vb, LineText, data1
LineText TEXTEQU < dw >
va = 1
vb = 1
cnt equ @SizeStr(<btext>)+1
WHILE va LT cnt
if vb LT 20
data1 SUBSTR <btext>, va, 1
LineText CATSTR LineText, <'>, data1, <',>
else
vb = 1
LineText SUBSTR LineText, 1, @SizeStr(%LineText)-1
&LineText
;; %echo LineText ;; Output the Unicode generated
LineText TEXTEQU < dw >
data1 SUBSTR <btext>, va, 1
LineText CATSTR LineText, <'>, data1, <',>
endif
vb = vb + 1
va = va + 1
ENDM
LineText SUBSTR LineText, 1, @SizeStr(%LineText)-1
&LineText
;; %echo LineText ;; Output the Unicode generated
endm
UNICODE MACRO aname:REQ, strng:VARARG
ALIGN 4
@CatStr( <&aname>, < LABEL BYTE >)
ifnb <strng>
%LL <&strng>
dw 0
endif
ENDM
Since i was revising it, I also made it simpler to use. It has two modes of operation.
[b]UNICODE LableName, <This is a short one line unicode string for file names etc.>[/b]
Or for longer static unicode strings that may take multiple lines:
[b]UNICODE LableName
%LL <This is my unicode explaination of how to use the static >
%LL <macros that i revised. Thanks to Wayne and Scronty for helping>
%LL <me identify that unicode strings need to be alligned on DWORD>
%LL <boundries for NT-like OS's. Guess us 9X'r have it E-Z ;) >
dw 0[/b]
Simple enough?
:alright:
NaN