home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / MBUG / MBUG099.ARC / GRDSK.I < prev    next >
Text File  |  1979-12-31  |  768b  |  45 lines

  1. Procedure GRSave(FileName : FileSpec);
  2.  
  3. var
  4.   I : Byte;
  5.   Buffer : array [0..$7FF] of byte;
  6.   Outfile : file;
  7.  
  8. Begin
  9.   Assign(Outfile,FileName);
  10.   Rewrite(Outfile);
  11.  
  12.   for I := 128 to 135 do
  13.     begin
  14.     Port[28] := I;
  15.     Move(PCGRAM,Buffer,$800);
  16.     BlockWrite(Outfile,Buffer,16);
  17.     end;
  18.   Close(Outfile);
  19.   Port[28] := 128;
  20. End;
  21.  
  22.  
  23.  
  24.  
  25. Procedure GRLoad(FileName : FileSpec);
  26.  
  27. var
  28.   I : Byte;
  29.   Buffer : array [0..$7FF] of byte;
  30.   Infile : file;
  31.  
  32. Begin
  33.   Assign(Infile,FileName);
  34.   Reset(Infile);
  35.  
  36.   for I := 128 to 135 do
  37.     begin
  38.     Port[28] := I;
  39.     BlockRead(Infile,Buffer,16);
  40.     Move(Buffer,PCGRAM,$800);
  41.     end;
  42.   Close(Infile);
  43.   Port[28] := 128;
  44. End;
  45.