I am trying to figure how how to input a string of text without the single quotes around each letter.

For example, "This is Matt's Gaming Emporium"

Thanks.



;********************************************
;SpVoice Simple example  By G-Spider 2010
;ml  /c /coff Speeker.asm
;link /subsystem:console Speeker.obj
;*******************************************
.586
.model flat,stdcall
option casemap:none
 include /masm32/include/windows.inc
 include /masm32/include/kernel32.inc
 include /masm32/include/user32.inc
 include /masm32/include/ole32.inc

 includelib /masm32/lib/kernel32.lib
 includelib /masm32/lib/user32.lib
 includelib /masm32/lib/ole32.lib

.data

TEXT    dw 'G','o','l','d','e','n',' ','S','p','i' ,'d','e','r',0

.data?
lpSpVoiceCOM    dd ?
include function_SpVoice.inc    ;<=====The above file
.code
Posted on 2010-11-26 05:20:31 by skywalker
skywalker,

Didn't you notice that TEXT was defined with dw directive (i.e. it's Unicode/wide string)? MASM restricts dw's initializer to be either of following:

  • numeric expression with value in proper range;

  • 16-bit near ptr;

  • two characters;

  • double-byte character (this includes regular ASCII).



Thus dw accepts strings only character-by-character. You may create macroinstruction somewhat analogous to fasm's du directive (irpc/forc directive may be useful), though it'll probably look and behave strange.
Posted on 2010-11-26 12:08:16 by baldr