Message board for the users of flat assembler.
> OS Construction > A question on the size of boot loaders
I know they have to be 512b in size and end with 55aah. But I was wondering if it's okay for the actual code for the boot loader to meet those requirements but be put at the start of the whole program. ex.
;boot code rb 510 + $$ - $ db 055h, 0aah ;This would be loaded by boot code
The reason I want to know is, because I don't know how to write/copy a file to a specific location i.e. the boot sector.
EDIT: Grammar and diction
|12 Dec 2009, 00:46||
yep, to access disk, first, try INT13h. fnction 2 to read, 3 to write.
do it sector by sectors.
and then, load the sector where you want.
to call it, use a fr pointer.
set the segment to have the good offset.
in Real mode :
segment * 16 + offset = linear.
|12 Dec 2009, 01:22||
I like to keep booter sperate so once its done, its done.
You can write it to disk and forget about it.
If you do it your way you will be writing the disk a lot more than needed.
You can use PARTCOPY or RAWWRITE or even DEBUG to do the writing.
Just be careful with these programs as they will do what you say
even if what you say is not entirely correct.
Also BOOTPROG is a nice FAT12 bootloader, you may want to get it.
|12 Dec 2009, 05:35||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.