home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MAPOVLAY.ZIP / MAPCPM.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-05-11  |  1.8 KB  |  54 lines

  1. {  Configuration routine for MAP.PAS for the CP/M family of Turbo Pascal compilers }
  2.  
  3. const MachineType = 'CP/M';
  4.       QuantizationSize = 128;
  5.       PaddingByte = $00;
  6.       TerminatingByte = $C9;
  7.  
  8. var Buffer: array[1..QuantizationSize] of byte;
  9.  
  10. function EndOfOverlay(var Fyle: BinaryFile;
  11.                       var Index,AmbiguousCount: integer;
  12.                       RetryCount: integer): boolean;
  13.   { Return true if last sector of an overlay is in the buffer }
  14.   begin
  15.   Index := QuantizationSize;
  16.   if Buffer[QuantizationSize]=TerminatingByte
  17.    then
  18.     begin                                        { If last byte in record is a return instruction, }
  19.     EndOfOverlay := not odd(RetryCount shr AmbiguousCount); { Check how to handle the ambiguity this time }
  20.     AmbiguousCount := succ(AmbiguousCount)
  21.     end
  22.    else
  23.     begin                                        { Look for a return instruction padded out with 00's }
  24.     while (Index>=1) and (Buffer[Index]=PaddingByte) do
  25.       Index := pred(Index);
  26.     EndOfOverlay := Buffer[Index]=TerminatingByte
  27.     end
  28.   end;
  29.  
  30. procedure CheckVersion;
  31.   { This routine is not executed, it only serves to check that the correct
  32.     configuration module is being used. }
  33.  
  34.  
  35.  
  36.  
  37.  
  38. (******************************************************************************
  39.            You are attempting to compile this program with the wrong
  40.            configuration file.  You need to change the include file
  41.            directive located about 20 lines from the beginning of
  42.            MAP.PAS to:
  43.                             {$I MAPDOS.PAS}
  44. ******************************************************************************)
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.   var Address: byte absolute $0000;
  52.   begin
  53.   end;
  54.