символы перевода строки вставляю так: Код (Text): .data szMessage db "Поздравляю, Шарик !",13,10,"Ты - балбес !",0 можно делать то-же самое, но не закрывая кавычки ? пробовал как в php - не сработало Код (Text): .data szMessage db "Поздравляю, Шарик !\r\nТы - балбес !",0
нашел нужный макрос. что означает символ $ в имени "cfm$" макроса ? Код (Text): ; ******************************************************** ; format a C style string complete with escape characters ; and return the offset of the result to the calling macro ; ******************************************************** cfm$ MACRO txt:VARARG ;; format C style string LOCAL buffer,lbuf,rbuf,sln,flag1,tmp,notq flag1 = 0 notq = 0 buffer equ <> lbuf equ <> rbuf equ <> FORC char,<txt> IFDIF <char>,<"> ;; test if 1st char is a quote notq = 1 EXITM ;; exit with notq set to 1 if its not ENDIF EXITM ;; else exit with notq set to 0 ENDM IF notq EQ 1 EXITM <txt> ;; return original arg if its not a quote ENDIF FORC char,<txt> IF flag1 NE 0 ;; process characters preceded by the escape character IFIDN <char>,<n> buffer CATSTR buffer,<",13,10,"> ;; \n = newline flag1 = 0 goto lpend ENDIF IFIDN <char>,<t> buffer CATSTR buffer,<",9,"> ;; \t = tab flag1 = 0 goto lpend ENDIF IFIDN <char>,<\> buffer CATSTR buffer,<\> ;; \\ = \ flag1 = 0 goto lpend ENDIF IFIDN <char>,<q> buffer CATSTR buffer,<",34,"> ;; \q = quote flag1 = 0 goto lpend ENDIF ;; --------------------- ;; masm specific escapes ;; --------------------- IFIDN <char>,<l> buffer CATSTR buffer,<",60,"> ;; \l = < flag1 = 0 goto lpend ENDIF IFIDN <char>,<r> buffer CATSTR buffer,<",62,"> ;; \r = > flag1 = 0 goto lpend ENDIF IFIDN <char>,<x> buffer CATSTR buffer,<",33,"> ;; \x = ! flag1 = 0 goto lpend ENDIF IFIDN <char>,<a> buffer CATSTR buffer,<",40,"> ;; \a = ( flag1 = 0 goto lpend ENDIF IFIDN <char>,<b> buffer CATSTR buffer,<",41,"> ;; \b = ) flag1 = 0 goto lpend ENDIF ENDIF IFIDN <char>,<\> ;; trap the escape character and set the flag flag1 = 1 goto lpend ENDIF buffer CATSTR buffer,<char> :lpend ENDM ;; --------------------------------------------- ;; strip any embedded <"",> characters sequences ;; --------------------------------------------- buffer CATSTR buffer,<,0,0,0> ;; append trailing zeros cpos INSTR buffer,<"",> ;; test for leading junk IF cpos EQ 1 buffer SUBSTR buffer,4 ;; chomp off any leading junk ENDIF :reloop cpos INSTR buffer,<"",> IF cpos EQ 0 ;; if no junk left goto done ;; exit the loop ENDIF lbuf SUBSTR buffer,1,cpos-1 ;; read text before junk rbuf SUBSTR buffer,cpos+3 ;; read text after junk buffer equ <> ;; clear the buffer buffer CATSTR lbuf,rbuf ;; concantenate the two goto reloop ;; loop back and try again :done sln SIZESTR buffer buffer SUBSTR buffer,1,sln-4 ;; trim off tail padding .data tmp db buffer ;; write result to DATA section .code EXITM <OFFSET tmp> ;; return the DATA section OFFSET ENDM