News:

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

Bingo !

Started by hutch--, February 01, 2006, 02:24:44 PM

Previous topic - Next topic

hutch--

After slowly going NUTZ trying to get this one to work, setting a flag did the trick.

The idea is to get the first arg as either quoted text or an address and if there is further code, place it in another .data section variable.


      conout MACRO quoted,therest:VARARG
        LOCAL txt
        var = 0
        invoke StdOut,reparg(quoted)
        FOR arg,<therest>
          IFNB arg
          var = 1
          ENDIF
        ENDM
        IF var eq 1
          .data
            txt db therest,0
          .code
        invoke StdOut,OFFSET txt
        ENDIF
      ENDM


PS: This is the next "print" macro which now performs identically to the masm version except it has the extra capacity of C string escapes within quoted text.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php