home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / Geneve / 9640news / CAT21 / PASCALB.ARK < prev    next >
Text File  |  2006-10-19  |  2KB  |  82 lines

  1. ?
  2.     This program will backup any disk
  3. using sector I/O; both 1 and multiple
  4.     drives and single/double sided.
  5. Written in UCSD Pascal for the TI 99/4A.
  6.  
  7.  
  8. {$L PRINTER: }
  9. program fastback;
  10. var
  11.     buffer:array[1..5120] of integer;
  12.     inunit,outunit:integer;
  13.     blkbase,blklimit:integer;
  14.     ch:string[9];
  15.  
  16. procedure getfrom;
  17. begin
  18.     inunit:=0;
  19.     while (inunit <>4) and (inunit <> 5)
  20. and (inunit <> 9) do
  21.     begin
  22.         write('Enter Source Drive #
  23. (4,5,9) ?');
  24.         readln(inunit)
  25.     end;
  26.     blkbase:=0;
  27.     while (blkbase <> 180) and (blkbase
  28. <> 360) do
  29.     begin
  30.         write('# blocks to copy
  31. (180/360) ?');
  32.         readln(blkbase)
  33.     end;
  34.     blklimit:=(blkbase div 10) - 1;
  35. end;
  36.  
  37. procedure getto;
  38. begin
  39.     outunit:=0;
  40.     while (outunit <>4) and (outunit<>5)
  41. and (outunit<>9) do
  42.     begin
  43.         write('Enter Copy Drive #
  44. (4,5,9) ?');
  45.         readln(outunit)
  46.     end
  47. end;
  48. begin
  49.     writeln('FASTBACK [V1.0]');
  50.     getfrom;
  51.     getto;
  52.     writeln('Insert disks--<CR> to
  53. start');
  54.     readln(ch);
  55.     for blkbase:=0 to blklimit do
  56.     begin
  57.         if inunit=outunit then
  58.         begin
  59.             write('Insert MASTER
  60. disk--press <CR> when ready');
  61.             readln(ch)
  62.         end;
  63.  
  64.  
  65. unitread(inunit,buffer,5120,blkbase*10);
  66.         if inunit=outunit then
  67.         begin
  68.             write('Insert COPY
  69. disk--press <CR> when ready');
  70.             readln(ch)
  71.         end;
  72.  
  73. unitwrite(outunit,buffer,5120,blkbase*10
  74. )
  75.     end;
  76.     writeln('Copy Complete.')
  77. end.
  78.  
  79. Download complete.  Turn off Capture File.
  80.  
  81.  
  82.