home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / prg / pas / pcl4p42 / pcl4p.pas < prev    next >
Pascal/Delphi Source File  |  1994-08-23  |  5KB  |  187 lines

  1. unit PCL4P;
  2.  
  3. interface
  4.  
  5. const
  6.    (* COMM Ports *)
  7.    COM1 = 0;
  8.    COM2 = 1;
  9.    COM3 = 2;
  10.    COM4 = 3;
  11.    COM5 = 4;
  12.    COM6 = 5;
  13.    COM7 = 6;
  14.    COM8 = 7;
  15.    COM9 = 8;
  16.    COM10 =  9;
  17.    COM11 = 10;
  18.    COM12 = 11;
  19.    COM13 = 12;
  20.    COM14 = 13;
  21.    COM15 = 14;
  22.    COM16 = 15;
  23.    (* Baud Rate Codes *)
  24.    NORESET  = -1;
  25.    Baud300  = 0;
  26.    Baud600  = 1;
  27.    Baud1200 = 2;
  28.    Baud2400 = 3;
  29.    Baud4800 = 4;
  30.    Baud9600 = 5;
  31.    Baud19200  = 6;
  32.    Baud38400  = 7;
  33.    Baud57600  = 8;
  34.    Baud115200 = 9;
  35.    (* Parity Codes *)
  36.    NoParity  = 0;
  37.    OddParity = 1;
  38.    EvenParity= 3;
  39.    (* Stop Bit Codes *)
  40.    OneStopBit  = 0;
  41.    TwoStopBits = 1;
  42.    (* Word Length Codes *)
  43.    WordLength5 = 0;
  44.    WordLength6 = 1;
  45.    WordLength7 = 2;
  46.    WordLength8 = 3;
  47.    (* Buffer Size Codes *)
  48.    Size128  = 4;
  49.    Size256  = 5;
  50.    Size512  = 6;
  51.    Size1024 = 7;
  52.    Size2048 = 8;
  53.    Size4096 = 9;
  54.    Size8192 =  10;
  55.    Size16384 = 11;
  56.    Size32768 = 12;
  57.    Size1K = 7;
  58.    Size2K = 8;
  59.    Size4K = 9;
  60.    Size8K = 10;
  61.    Size16K = 11;
  62.    Size32K = 12;
  63.    (* Line Status Masks *)
  64.    TransBufferEmpty = $20;
  65.    BreakDetect  = $10;
  66.    FramingError = $08;
  67.    ParityError  = $04;
  68.    OverrunError = $02;
  69.    DataReady    = $01;
  70.    (* Modem Status Masks *)
  71.    DCD = $80;
  72.    RI  = $40;
  73.    DSR = $20;
  74.    CTS = $10;
  75.    DeltaDCD = $08;
  76.    DeltaRI  = $04;
  77.    DeltaDSR = $02;
  78.    DeltaCTS = $01;
  79.    (* Break Signal Commands *)
  80.    ASSERT = 'A';
  81.    CANCEL = 'C';
  82.    DETECT = 'D';
  83.    (* SioDTR & SioRTS Commands *)
  84.    SetPort = 'S';
  85.    ClrPort = 'C';
  86.    ReadPort = 'R';
  87.    (* FIFO level codes *)
  88.    LEVEL_1 =  0;
  89.    LEVEL_4 =  1;
  90.    LEVEL_8 =  2;
  91.    LEVEL_14 = 3;
  92.    (* IRQ codes *)
  93.    IRQ1  = 1;
  94.    IRQ2  = 2;
  95.    IRQ3  = 3;
  96.    IRQ4  = 4;
  97.    IRQ5  = 5;
  98.    IRQ6  = 6;
  99.    IRQ7  = 7;
  100.    (* SioInfo arguments *)
  101.    VERSION = 'V';
  102.    (* timeing constants *)
  103.    ONE_SECOND = 18;
  104.    SHORT_WAIT = 4;
  105.    LONG_WAIT = 10;
  106.    (* CardType constants *)
  107.    PC_PORTS = 0;
  108.    DIGIBOARD = 1;
  109.    BOCABOARD = 2;
  110.  
  111. function SioBaud(Port, BaudCode : Integer) : Integer;
  112. function SioBrkKey : Boolean;
  113. function SioBrkSig(Port : Integer; Cmd : Char) : Integer;
  114. function SioCTS(Port : Integer) : Integer;
  115. function SioDCD(Port : Integer) : Integer;
  116. function SioDelay(Tics : Integer) : Integer;
  117. function SioDone(Port : Integer) : Integer;
  118. function SioDSR(Port : Integer) : Integer;
  119. function SioDTR(Port : Integer; Cmd : Char) : Integer;
  120. function SioError(Code : Integer) : Integer;
  121. function SioFIFO(Port, Code : Integer) : Integer;
  122. function SioFlow(Port, Tics : Integer) : Integer;
  123. function SioGetc(Port, Tics : Integer) : Integer;
  124. function SioGetDiv(Port : Integer) : Integer;
  125. function SioInfo(Cmd : Char) : Integer;
  126. function SioIRQ(Port, IRQcode : Integer) : Integer;
  127. function SioLine(Port : Integer) : Integer;
  128. function SioLoopBack(Port : Integer) : Integer;
  129. function SioModem(Port, Mask : Integer) : Integer;
  130. function SioParms(Port, ParityCode, StopBitsCode, WordLengthCode : Integer) : Integer;
  131. function SioPorts(NumberPorts, FirstPort, StatusReg, CardType : Integer) : Integer;
  132. function SioPutc(Port : Integer; Ch : Char) : Integer;
  133. function SioRead(Port, Register : Integer) : Integer;
  134. function SioReset(Port, BaudCode : Integer) : Integer;
  135. function SioRI(Port : Integer) : Integer;
  136. function SioRTS(Port : Integer; Cmd : Char ) : Integer;
  137. function SioRxBuf(Port, BufferSeg, SizeCode : Integer) : Integer;
  138. function SioRxFlush(Port : Integer) : Integer;
  139. function SioRxQue(Port : Integer) : Integer;
  140. function SioTimer : LongInt;
  141. function SioTxBuf(Port, BufferSeg, SizeCode : Integer) : Integer;
  142. function SioTxFlush(Port : Integer) : Integer;
  143. function SioTxQue(Port : Integer) : Integer;
  144. function SioUART(Port, Address : Integer) : Integer;
  145. function SioUnGetc(Port : Integer; Ch : Byte ) : Integer;
  146.  
  147.  
  148. implementation
  149.  
  150. {$L PCL4PLIB}
  151.  
  152. function SioBaud ; external;
  153. function SioBrkKey ; external;
  154. function SioBrkSig ; external;
  155. function SioCTS ; external;
  156. function SioDCD ; external;
  157. function SioDelay ; external;
  158. function SioDone ; external;
  159. function SioDSR ; external ;
  160. function SioDTR ; external;
  161. function SioError ; external;
  162. function SioFIFO ; external;
  163. function SioFlow ; external;
  164. function SioGetc ; external;
  165. function SioGetDiv ; external;
  166. function SioInfo ; external;
  167. function SioIRQ ; external;
  168. function SioLine ; external;
  169. function SioLoopBack ; external;
  170. function SioModem ; external;
  171. function SioParms ; external;
  172. function SioPorts ; external;
  173. function SioPutc ; external;
  174. function SioRead ; external;
  175. function SioReset ; external;
  176. function SioRI ; external;
  177. function SioRTS ; external;
  178. function SioRxBuf ; external;
  179. function SioRxFlush ; external;
  180. function SioRxQue ; external;
  181. function SioTimer ; external;
  182. function SioTxBuf ; external;
  183. function SioTxFlush ; external;
  184. function SioTxQue ; external;
  185. function SioUART ; external;
  186. function SioUnGetc ; external;
  187. end.