Writing to specific sectors

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Writing to specific sectors

Post by pcmattman »

Hello all, I've run into a problem. I need to write my kernel to the sector directly after the bootsector, but so far my attempts at writing a sector copy program have not worked and I can't find a Windows version of this sort of program. Does anyone know any links to programs that can do this?

(My C++ code opened "\\.\A:" to directly access the disk, which didn't work)
User avatar
JackScott
Member
Member
Posts: 1036
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Mastodon: https://aus.social/@jackscottau
Matrix: @JackScottAU:matrix.org
GitHub: https://github.com/JackScottAU
Contact:

Post by JackScott »

http://www.osdever.net/downloads/other/pcopy02.zip

That is the partcopy program, which can be used on DOS/Windows to write bootsectors, and it can be used for other floppy-related tasks as well. I hope this is what you want.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Sounds good, I'll look into it and see if it works.
mohammed
Member
Member
Posts: 93
Joined: Mon Jan 30, 2006 12:00 am
Location: Mansoura, Egypt

Post by mohammed »

in this program you can't specify a sector it write in the first sector only right ??
User avatar
JackScott
Member
Member
Posts: 1036
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Mastodon: https://aus.social/@jackscottau
Matrix: @JackScottAU:matrix.org
GitHub: https://github.com/JackScottAU
Contact:

Post by JackScott »

From the documentation:
USAGE:
PARTCOPY source source_offset length destination {destination_offset}
It seems the final parameter allows you to select an offset.[/quote]
Post Reply