Page 1 of 1

writing to a floppy

Posted: Mon Nov 04, 2002 7:49 pm
by elias
hi. i need a way to write my sector and test kernel to a floopy, and see all these references to partcopy, so i decided to get it. the onyl prob is that i dont know how to use it, and the readme file dosnt really help. how would i copy my bootsector to sector 1 on the floppy? and my kenrle to sector 2? ans also, i knwo the boot sector msut be 512 bytes, the size of the sector, but does the kernel also need to fill the whole sector? the test kernls only 46 bytes, but shoudl i include the times directive to make it 512 bytes?

Re:writing to a floppy

Posted: Mon Nov 04, 2002 8:14 pm
by adeelmahmood1
for the boot sector:
if ur bootsector is in bootsector.bin... its size is 512 bytes converted to hex (200) and u want to copy it to the sector 1 of the floppy so do it like that:

partcopy bootsector.bin 0 200 -f0 0

it will copy ur bootsector.asm from 0 offset to 200 offset (512 bytes i.e till the end of it ) on floppy ( -f0 ) starting at offset 0 as sector one of floppy starts from here

now for the test kernel:
it doesnt needs to be a 512 bytes this restriction only applies to the boot sector .. it doesnt matter if ur test kernel is 46 bytes or 36 or 96 ;)
so do it like this

partcopy testKernel.bin 0 2E -f0 200

this will copy ur test kernel contents starting from 0 offset (start) to 2e offset (46 : hex 2e i.e end of file) on floppy (-f0) starting at 200 offset
200 offset converted to dec is 512 .. from here sector 2 starts so u copy ur test kernel here
try this