diff --git a/src/sys/boot/bootsec.asm b/src/sys/boot/bootsec.asm index 4fa1b66..d3783a2 100755 --- a/src/sys/boot/bootsec.asm +++ b/src/sys/boot/bootsec.asm @@ -56,7 +56,7 @@ xor ax, ax mov ds, ax mov dl, [bootdrv] - mov bx, 0x60 +;mji mov bx, 0x60 ; mjikaboom mov bx, 0x0a000 mov es, bx @@ -77,15 +77,17 @@ ;lets convert the ELF file to a linear binary so we can execute it ;mji cmp dword [0x600],464c457fh ; The ELF signature is \07fELF ;mjikaboom - cmp dword [0x0a0000],464c457fh ; The ELF signature is \07fELF + mov ax, 0x0a000 + mov es, ax + cmp dword [es:0],464c457fh ; The ELF signature is \07fELF jne ldr_ELF_err ; Ugh... not an ELF file !!! ;mji cmp word [0x600+4],101h ; It should be statically linked etc. ;mjikaboom - cmp word [0x0a0000+4],101h ; It should be statically linked etc. + cmp word [es:4],101h ; It should be statically linked etc. jne ldr_ELF_err ;mji cmp byte [0x600+6],1 ;mjikaboom - cmp byte [0x0a0000+6],1 + cmp byte [es:6],1 jne ldr_ELF_err jmp short skip_err_handler ldr_ELF_err: