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.BIO
< prev
next >
Wrap
Text File
|
2000-06-30
|
768b
|
31 lines
Function InByte: byte;
Begin
If BytePtr>127 then
Begin BlockRead (RelFile,Buffer,1); BytePtr :=0 End;
InByte := Buffer[BytePtr]; BytePtr := Succ(BytePtr);
End;
Function GetBits (NBits: Bits): byte;
Begin
WB.High :=0;
if BitCnt<NBits then
Begin WW := WW shl BitCnt; NBits := NBits - BitCnt;
WB.Low := InByte; BitCnt := 8 End;
WW := WW shl NBits; BitCnt := BitCnt - NBits;
GetBits := WB.High
End;
Function GetByte: byte;
Begin
If BitCnt=0 then GetByte := InByte else GetByte := GetBits(8)
End;
Function GetWord: integer;
Var WB: ByteRec; WW: integer absolute WB;
Begin
with WB do Begin Low := GetByte; High := GetByte End;
GetWord := WW
End;
etByte: byte;
Begin
If BitCnt=0 then GetByte := InByte els