flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Problems With PartCopy |
Author |
|
revolution 04 Jul 2010, 13:33
For PartCopy help perhaps Google can help you?
Does PartCopy not come with a help file? Moved to OS Construction |
|||
04 Jul 2010, 13:33 |
|
nathanpc 04 Jul 2010, 13:55
I've downloaded from the project homepage, but it didn't came with a help file.
|
|||
04 Jul 2010, 13:55 |
|
revolution 04 Jul 2010, 13:58
Perhaps typing PartCopy without any parameters gives a usage/help response?
|
|||
04 Jul 2010, 13:58 |
|
dosin 04 Jul 2010, 16:07
just wondering - why use partcopy?
if on windows you can use debug to write to a floppy... or there are other tools avail.. for debug: type: debug file_name.bin -w 100 0 0 1 or you can use winimage -to make a floppy image.. ect.. http://wiki.osdev.org/Babystep1 scroll down to : Creating disk image |
|||
04 Jul 2010, 16:07 |
|
Mac2004 04 Jul 2010, 17:02
|
|||
04 Jul 2010, 17:02 |
|
mindcooler 04 Jul 2010, 20:20
This is a little tool I made a couple of years ago. Writes the first 512 bytes of a file to the first 512 bytes of a floppy a:, which happens to be the boot sector. Only tested on XP.
Delphi 5 code: Code: program boohsec; {$APPTYPE CONSOLE} uses windows; const IOCTL_DISK_IS_WRITABLE=458788; var drivehandle:hwnd; buffer:array[0..511] of byte; n:cardinal; sectorfile:hfile; filename:widestring; function getparam:widestring; var posi:integer; begin result:=getcommandlinew; if result[1]='"' then begin delete(result,1,1); posi:=pos('"',result); delete(result,1,posi+1); end else begin posi:=pos(' ',result); delete(result,1,posi); end; end; function MAKELANGID(p,s:word):dword; begin result:=(s shl 10) or p; end; procedure err(title:widestring='Error'); var buffer:pwidechar; begin FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_IGNORE_INSERTS, nil,GetLastError,MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), @buffer,0,nil); MessageBoxW(0,buffer,pwidechar(title),mb_ok); halt(getlasterror); end; begin filename:=getparam; drivehandle:=createfile('\\.\a:',GENERIC_READ or GENERIC_WRITE,FILE_SHARE_WRITE,nil,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0); if not(DeviceIoControl(drivehandle,IOCTL_DISK_IS_WRITABLE,nil,0,nil,0,n,nil)) then begin MessageBox(0,'Drive is not writable',nil,mb_ok); halt(1); end; sectorfile:=createfilew(pwidechar(filename),GENERIC_READ,FILE_SHARE_READ,nil,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0); if sectorfile=INVALID_HANDLE_VALUE then err(filename); if not(readfile(sectorfile,buffer,512,n,nil)) then err('readfile'); if not(writefile(drivehandle,buffer,sizeof(buffer),n,nil)) then err('writefile'); closehandle(drivehandle); end.
_________________ This is a block of text that can be added to posts you make. |
|||||||||||
04 Jul 2010, 20:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.