Where in memory does an EL-Torito bootsector end?
Re: Where in memory does an EL-Torito bootsector end?
I don't know which debugger to use or how to install it. I searched the internet for information on how to install a debugger or how to use one, but I didn't find anything useful.
Re: Where in memory does an EL-Torito bootsector end?
You potentially want the Bochs debugger. You can enable it when you compile your own custom Bochs.
Re: Where in memory does an EL-Torito bootsector end?
Say, isn't this weird? I took the same code and changed it a little:
Then I assembled it and (without El Torito stuff) tested it out in QEMU. It prints both letters (the "F" and the "S")!
Code: Select all
BITS 16
[org 0x7C00]
start:
mov ah,0xe
mov al,'F'
int 0x10
mov ah,0xe
mov al,'S'
int 0x10
jmp $
times 510-($-$$) db 0
dw 0xaa55
Re: Where in memory does an EL-Torito bootsector end?
I emailed Mike, the editor of the OS Development Series on BrokenThorn.com, asking him my question. He reformatted my code and sent it back to me in an email. When I looked at the way he reformatted my code, I understood what the problem with my code was. An ISO 9660 bootfile has a different format. At 8 bytes into your code, ISO 9660 puts in two system identifier fields, each one taking up 32 bytes. Since I didn't declare a space for these fields, they were put in anyway, overwriting some of my code. To avoid this problem, my code can be written like this:
In the light of this, it can also be explained why when I wrote my code as shown below, assembled it and tested it out on QEMU without El Torito stuff, it worked.
Since this is not an ISO 9660 bootfile, it doesn't need to declare a space for system identifier fields.
Code: Select all
BITS 16
[org 0x0]
jmp 0x7c0:start
times 71-($-$$) db 0
start:
mov ah,0xe
mov al,'F'
int 0x10
mov al,'S'
int 0x10
jmp $
times 2048-($-$$) db 0
Code: Select all
BITS 16
[org 0x7C00]
start:
mov ah,0xe
mov al,'F'
int 0x10
mov ah,0xe
mov al,'S'
int 0x10
jmp $
times 510-($-$$) db 0
dw 0xaa55