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 / CPM / TURBOPAS / PMLINK.LBR / PMLINK.BIT < prev    next >
Text File  |  2000-06-30  |  896b  |  29 lines

  1. Function InByte: byte;
  2. Begin
  3.   If BytePtr>127 then
  4.     Begin BlockRead (RelFile,Buffer,1); BytePtr :=0 End;
  5.   InByte := Buffer[BytePtr]; BytePtr := Succ(BytePtr);
  6. End;
  7.  
  8. Function GetBits (NBits: Bits): byte;
  9.   begin {Modul GETBTS}
  10.     InLine (
  11.   {0000}     $21/$00/$00/$3A/NBITS  /$4F/$3A/BITCNT /$B9/$30/$23/$47/$79/$90/
  12.   {0010}     $32/NBITS  /$3A/WB     /$CD/*+40   /$E5/$CD/INBYTE /$3A/NBITS  /
  13.   {0020}     $47/$3E/$08/$90/$32/BITCNT /$7D/$E1/$CD/*+21   /$32/WB     /$C9/
  14.   {0030}     $41/$90/$32/BITCNT /$3A/WB     /$CD/*+6    /$32/WB     /$C9/$CB/
  15.   {0040}     $27/$CB/$15/$10/$FA/$C9)
  16.   end;  {GETBTS}
  17.  
  18. Function GetByte: byte;
  19. Begin
  20.   If BitCnt=0 then GetByte := InByte else GetByte := GetBits(8)
  21. End;
  22.  
  23. Function GetWord: integer;
  24.   Var WB: ByteRec; WW: integer absolute WB;
  25. Begin
  26.   with WB do Begin Low := GetByte; High := GetByte End;
  27.   GetWord := WW
  28. End;
  29. et