From 1c92530cd089a50d5d71b813d79506b2d4f8ae48 Mon Sep 17 00:00:00 2001 From: hpa Date: Tue, 16 Aug 2005 19:43:41 +0000 Subject: [PATCH] Don't modify data in the checksum region before we can checksum the code. --- ldlinux.asm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ldlinux.asm b/ldlinux.asm index e8e53fb..5ef6c15 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -627,10 +627,10 @@ ldlinux_ent: ; Tell the user if we're using EBIOS or CBIOS ; print_bios: - mov si,bios_name + mov si,cbios_name cmp byte [getlinsec.jmp+1],(getlinsec_ebios-(getlinsec.jmp+2)) jne .cbios - mov byte [si],'E' + mov si,ebios_name .cbios: call writestr @@ -713,7 +713,7 @@ writestr: jmp short .loop .return: ret -; + ; getlinsecsr: save registers, call getlinsec, restore registers ; getlinsecsr: pushad @@ -724,12 +724,13 @@ getlinsecsr: pushad ; ; Checksum error message ; -checksumerr_msg db 'Load error - ', 0 ; Boot failed appended +checksumerr_msg db ' Load error - ', 0 ; Boot failed appended ; ; BIOS type string ; -bios_name db 'CBIOS ', 0 +cbios_name db 'CBIOS', 0 +ebios_name db 'EBIOS', 0 ; ; Debug routine @@ -744,7 +745,7 @@ safedumpregs: rl_checkpt equ $ ; Must be <= 8000h rl_checkpt_off equ ($-$$) -%if 0 ; ndef DEPEND +%ifndef DEPEND %if rl_checkpt_off > 400h %error "Sector 1 overflow" %endif -- 2.7.4