TCORAM%UDCVAX.BITNET@cunyvm.cuny.edu (01/05/88)
I have a small problem... I have the Minix binaries on 5 1/4" floppies and need to transfer them to 3 1/2" floppies. That is the small problem. The big problem is that I have a PC with a 5 1/4" floppy & hard drive and I have no external 3 1/2 drive to hook up. The only 3 1/2 drive I can get near the PC is the internal drive in my portable PC. I normally transfer software via modem cable between the two machines. (I can't hook either drive into either machine.) I am looking for an easy way to transfer the bit image of the Minix boot floppy to the portable PC w/ the 3 1/2 drive. Any suggestions? Chances are, the binaries won't even run on my portable PC.... but, still... (actually, I don't mind porting the system if necessary, but I need to at least get the stuff on 3 1/2 disks...) **famous last words, huh? ;) Thanks in advance.... _____________________________________________________________ | maroC ddoT | Todd Coram | | tcoram@udcvax.bitnet | tentib.xavcdu@maroct | | remmargorP | Programmer | | retneC retupmoC cimedacA CDU | UDC Academic Computer Center | |_____________________________________________________________| "Trust me, I know what I'm doing..."
bishop@ecsvax.UUCP (Alan Bishop) (01/05/88)
In article <929@louie.udel.EDU> TCORAM%UDCVAX.BITNET@cunyvm.cuny.edu writes: >I normally transfer >software via modem cable between the two machines. (I can't hook either >drive into either machine.) I am looking for an easy way to transfer the >bit image of the Minix boot floppy to the portable PC w/ the 3 1/2 drive. >Any suggestions? I had this same problem moving files from my IBM PC to my PS/2. I have the parallel conversion thing. I expect that many people will have this problem as people switch over to 3.5" disks. Here are two quick programs that can be used. The first one is run on the 5.25" machine and converts a 360K disks (9 sectors/track, double sided) into two files which then can be moved over. (Of course, it may be a bit slow via modem cable.) The second program takes these two files and writes them to a 720K disk (which is 9 sectors/track, double sided). Here they are. They are NOT as efficient as possible (they read one sector at a time and move the head to each track twice.) They are in Turbo Pascal, although they are simple enough to translate to assembler or C if you don't have that. (warning: The "read files in" program was just recreated using the very similar "write files out" program, as I don't have it on this computer. If it doesn't work, send me mail.) alan --read files in-- {$u+} {$g256} {$p256} program Diskcopy; type Regpack = record AX, BX, CX, DX, BP, SI, DI, DS, ES, Flags : integer; end; Sector = array [0..511] of byte; var Head, Track, Sectnum : integer; Regs : Regpack; Outfile : file of Sector; Mrsect : Sector; begin Regs.AX := $0000; Intr($13, Regs); if odd(Regs.Flags) then writeln('Error resetting system.'); assign(Outfile, 'sect1.dat'); rewrite(Outfile); for Head := 0 to 1 do begin for Track := 0 to 39 do begin for Sectnum := 1 to 9 do begin repeat Regs.AX := $0201; Regs.DX := Head shl 8; Regs.CX := Track shl 8 + Sectnum; Regs.ES := seg(MrSect); Regs.BX := ofs(MrSect); Intr($13, Regs); if odd(Regs.Flags) then begin writeln('Error at Head ', Head, ', Sector ', Sectnum, ', Track ', Track); writeln('AH=', Regs.AX shr 8); writeln('Repeating.'); end; until not odd(Regs.Flags); write(Outfile, Mrsect); end; writeln('Track: ', Track); end; if Head = 0 then begin close(Outfile); assign(Outfile, 'sect2.dat'); rewrite(Outfile); end; end; close(Outfile); end. ---write files out--- {$u+} {$g256} {$p256} program Diskcopy; type Regpack = record AX, BX, CX, DX, BP, SI, DI, DS, ES, Flags : integer; end; Sector = array [0..511] of byte; var Head, Track, Sectnum : integer; Regs : Regpack; Infile : file of Sector; Mrsect : Sector; begin Regs.AX := $0000; Intr($13, Regs); if odd(Regs.Flags) then writeln('Error resetting system.'); assign(Infile, 'sect1.dat'); reset(Infile); for Head := 0 to 1 do begin for Track := 0 to 39 do begin for Sectnum := 1 to 9 do begin read(Infile, Mrsect); repeat Regs.AX := $0301; Regs.DX := Head shl 8; Regs.CX := Track shl 8 + Sectnum; Regs.ES := seg(MrSect); Regs.BX := ofs(MrSect); Intr($13, Regs); if odd(Regs.Flags) then begin writeln('Error at Head ', Head, ', Sector ', Sectnum, ', Track ', Track); writeln('AH=', Regs.AX shr 8); writeln('Repeating.'); end; until not odd(Regs.Flags); end; writeln('Track: ', Track); end; if Head = 0 then begin close(Infile); assign(Infile, 'sect2.dat'); reset(Infile); end; end; close(Infile); end. ---end of stuff--- alan