News:

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

some questions about szText Macro

Started by xiahan, April 06, 2012, 02:37:37 PM

Previous topic - Next topic

xiahan



          szText MACRO Name, Text:VARARG
                     LOCAL lbl
                           jmp lbl
                            Name db Text,0
                          lbl:
                     ENDM

              ....

            szText AboutMsg,"Minifile Version 1.0 Copyright ?1999",13,10, \
            "Steve Hutchesson < hutch@pbq.com.au >"

            szText AboutTitle,"Assembler Minifile"
            invoke ShellAbout,hWin,ADDR AboutTitle,ADDR AboutMsg,hIcon



the Text:VARARG says this parameter is variable, and the AboutMsg seems has 4 parameters, how dose the db work,

dedndave

VARARG says there are a variable number of arguments

xiahan

Quote from: dedndave on April 06, 2012, 02:50:14 PM
VARARG says there are a variable number of arguments
Oh,I misunderstood its meaning

hutch--

 xiahan,

The purpose of that macro is to write text data directly into the code section. It is effectively read only unless you change the attributes of the executable file in its link options. The reason for the VARARG is so you can pass text that has "," in it without the old macro parser stopping at the "," character.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php