relocating bootloader
Posted: Thu May 12, 2011 9:24 pm
My bootloader appears to relocate itself and run correctly, is anyone able (and willing, thanks in advance ) to verify that the code does what I think it does?
https://github.com/schilds/Serial-BootL ... loader.asm
It should relocate some of itself (the main loop and some functions) to just before where it used to be (i.e. just before the boot sector, 0x7c00). The function of the relocated main loop should be to read and parse bytes from the serial port, store them to the (now free to overwrite) boot sector and then execute them.
Basically I've written the relocation as if it were position independent (i.e. works with just a simple copy), but I'm not actually sure that it is. How do I know whether the assembler is creating absolute or relative jumps/calls?
https://github.com/schilds/Serial-BootL ... loader.asm
It should relocate some of itself (the main loop and some functions) to just before where it used to be (i.e. just before the boot sector, 0x7c00). The function of the relocated main loop should be to read and parse bytes from the serial port, store them to the (now free to overwrite) boot sector and then execute them.
Basically I've written the relocation as if it were position independent (i.e. works with just a simple copy), but I'm not actually sure that it is. How do I know whether the assembler is creating absolute or relative jumps/calls?