Use CR, LF and NUL in .ascii macro instead of using .asciz or "\r" "\n", since the latter is not portable

svn path=/trunk/; revision=52341
This commit is contained in:
Timo Kreuzer 2011-06-18 14:50:24 +00:00
parent 66aecb94b7
commit 7aae064929
4 changed files with 36 additions and 34 deletions

View file

@ -406,9 +406,9 @@ NoCarryCHS:
msgDiskError: msgDiskError:
.asciz "Disk error\r\n" .ascii "Disk error", CR, LF, NUL
msgFreeLdr: msgFreeLdr:
.asciz "ldr not found\r\n" .ascii "ldr not found", CR, LF, NUL
// Sorry, need the space... // Sorry, need the space...
//msgAnyKey: //msgAnyKey:
// .asciz "Press any key to restart\r\n" // .asciz "Press any key to restart\r\n"

View file

@ -522,11 +522,11 @@ PrintFileNotFound:
jmp Reboot jmp Reboot
msgFreeLdr: msgFreeLdr:
.asciz "freeldr.sys not found\r\n" .ascii "freeldr.sys not found", CR, LF, NUL
filename: filename:
.ascii "FREELDR SYS" .ascii "FREELDR SYS"
msgLoading: msgLoading:
.asciz "Loading FreeLoader...\r\n" .ascii "Loading FreeLoader...\r\n", CR, LF, NUL
.org 1022 // Pad to 1022 bytes .org 1022 // Pad to 1022 bytes

View file

@ -923,67 +923,67 @@ pollchar_and_empty:
isolinux_banner: isolinux_banner:
.asciz CR, LF, "Loading IsoBoot...", CR, LF .ascii CR, LF, "Loading IsoBoot...", CR, LF, NUL
copyright_str: copyright_str:
.asciz " (C) 1994-2002 H. Peter Anvin", CR, LF .ascii " (C) 1994-2002 H. Peter Anvin", CR, LF, NUL
presskey_msg: presskey_msg:
.asciz "Press any key to boot from CD" .ascii "Press any key to boot from CD", NUL
dot_msg: dot_msg:
.asciz "." .ascii ".", NUL
#ifdef DEBUG_MESSAGES #ifdef DEBUG_MESSAGES
startup_msg: startup_msg:
.asciz "Startup, DL = '" .ascii "Startup, DL = '", NUL
spec_ok_msg: spec_ok_msg:
.asciz "packet OK, drive = " .ascii "packet OK, drive = ", NUL
secsize_msg: secsize_msg:
.asciz "size appears to be " .ascii "size appears to be ", NUL
rootloc_msg: rootloc_msg:
.asciz "Root dir loc: " .ascii "Root dir loc: ", NUL
rootlen_msg: rootlen_msg:
.asciz "Root dir len: " .ascii "Root dir len: ", NUL
rootsect_msg: rootsect_msg:
.asciz "Root dir len(sect): " .ascii "Root dir len(sect): ", NUL
fileloc_msg: fileloc_msg:
.asciz "SETUPLDR loc: " .ascii "SETUPLDR loc: ", NUL
filelen_msg: filelen_msg:
.asciz "SETUPLDR len: " .ascii "SETUPLDR len: ", NUL
filesect_msg: filesect_msg:
.asciz "SETUPLDR len(sect): " .ascii "SETUPLDR len(sect): ", NUL
findfail_msg: findfail_msg:
.asciz "Failed to find file!" .ascii "Failed to find file!", NUL
startldr_msg: startldr_msg:
.asciz "Starting SETUPLDR.SYS" .ascii "Starting SETUPLDR.SYS", NUL
#endif #endif
spec_err_msg: spec_err_msg:
.asciz "Load spec failed, trying wing ...", CR, LF .ascii "Load spec failed, trying wing ...", CR, LF, NUL
maybe_msg: maybe_msg:
.asciz "Found smth at drive = " .ascii "Found smth at drive = ", NUL
alright_msg: alright_msg:
.asciz "might be ok, continuing...", CR, LF .ascii "might be ok, continuing...", CR, LF, NUL
nothing_msg: nothing_msg:
.asciz "Failed locate CD-ROM; boot failed.", CR, LF .ascii "Failed locate CD-ROM; boot failed.", CR, LF, NUL
isolinux_str: isolinux_str:
.asciz "IsoBoot: " .ascii "IsoBoot: ", NUL
crlf_msg: crlf_msg:
.asciz CR, LF .ascii CR, LF, NUL
diskerr_msg: diskerr_msg:
.asciz "Disk error " .ascii "Disk error ", NUL
ondrive_str: ondrive_str:
.asciz ", drive " .ascii ", drive ", NUL
err_bootfailed: err_bootfailed:
.asciz CR, LF, "failed.." .ascii CR, LF, "failed..", NUL
isolinux_dir: isolinux_dir:
.asciz "\\LOADER" .ascii "\\LOADER", NUL
no_dir_msg: no_dir_msg:
.asciz "LOADER dir not found.", CR, LF .ascii "LOADER dir not found.", CR, LF, NUL
isolinux_bin: isolinux_bin:
.asciz "SETUPLDR.SYS" .ascii "SETUPLDR.SYS", NUL
no_isolinux_msg: no_isolinux_msg:
.asciz "SETUPLDR not found.", CR, LF .ascii "SETUPLDR not found.", CR, LF, NUL
// //

View file

@ -44,10 +44,10 @@ ENDM
#define ENDFUNC .ENDP #define ENDFUNC .ENDP
/* MASM doesn't have an ASCII macro */ /* MASM doesn't have an ASCII macro */
.ASCII MACRO text .ASCII MACRO text:VARARG
DB text DB text
ENDM ENDM
.ascii MACRO text .ascii MACRO text:VARARG
DB text DB text
ENDM ENDM
@ -162,6 +162,7 @@ ENDM
#define CR 13 #define CR 13
#define LF 10 #define LF 10
#define NUL 0
#else /***********************************************************************/ #else /***********************************************************************/
@ -312,5 +313,6 @@ ENDM
#define CR "\r" #define CR "\r"
#define LF "\n" #define LF "\n"
#define NUL "\0"
#endif #endif