RS232.LST 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * RS232.MOD - COMMS Toolkit serial i/o *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1988..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 IMPLEMENTATION MODULE RS232;
  13. 12 (*%F _OS2*)
  14. 13 (* DOS Version *)
  15. 14 (*# check(index=>off)*)
  16. 15 IMPORT Lib,SYSTEM;
  17. 16
  18. 17 CONST
  19. 18 BuffSize = 1024;
  20. 19 LowWater = BuffSize DIV 4; (* Buffer Level when Rx is enabled *)
  21. 20 HighWater = LowWater * 3; (* Buffer Level when Rx is disabled *)
  22. 21 ICOCW2 = 20H; (* int. controller op. control word 2 *)
  23. 22 ICOCW1 = 21H; (* int. controller op. control word 1 (mask) *)
  24. 23 (* Intel 8250 register address offsets *)
  25. 24 RBR = 0; (* receive buffer register *)
  26. 25 THR = 0; (* transmitter holding register *)
  27. 26 DLL = 0; (* divisor latch low (least significant) *)
  28. 27 DLM = 1; (* divisor latch high (most significant) *)
  29. 28 IER = 1; (* interrupt enable register *)
  30. 29 IIR = 2; (* interrupt identification register *)
  31. 30 LCR = 3; (* line control register *)
  32. 31 MCR = 4; (* modem control register *)
  33. 32 LSR = 5; (* line status register *)
  34. 33 MSR = 6; (* modem status register *)
  35. 34
  36. 35 TYPE
  37. 36 StopStart = (Stop,Start);
  38. 37 RingBuffer = RECORD
  39. 38 rptr,wptr : CARDINAL;
  40. 39 Buff : ARRAY[0..BuffSize-1] OF CHAR;
  41. 40 END;
  42. 41
  43. 42 VAR
  44. 43 (*# save, data(volatile=>on)*) (* Modified asyncronously - so dont keep in registers! *)
  45. 44 TxIdle,NoTx : BOOLEAN;
  46. 45 RxBuff,TxBuff : RingBuffer;
  47. 46 RxCount : CARDINAL; (* a count of the chars currently in the Rx buffer *)
  48. 47 (*# restore *)
  49. 48 FlowCtrlType : FlowControls;
  50. 49 Installed,
  51. 50 DCD,CTS,Dummy : BOOLEAN;
  52. 51 OldVector : FarADDRESS;
  53. 52 Continue : PROC;
  54. 53
  55. 54 (*.............................................*)
  56. 55
  57. 56 PROCEDURE Pause():BOOLEAN;
  58. 57 BEGIN
  59. 58 (* This procedure just wastes a little time so that chips have a *)
  60. 59 (* little time to recover between IO calls. *)
  61. 60 RETURN TRUE; (* do something so that the compiler doesnt optimise *)
  62. 61 END Pause; (* this procedure out! *)
  63. 62
  64. 63 (*.............................................*)
  65. 64
  66. 65 PROCEDURE GetVector(Int:WORD):FarADDRESS;
  67. 66 VAR
  68. 67 r : SYSTEM.Registers;
  69. 68 BEGIN
  70. 69 r.AH := 35H;
  71. 70 r.AL := BYTE(Int);
  72. 71 Lib.Intr(r,21H); (* DOS Interrupt *)
  73. 72 RETURN [r.ES:r.BX];
  74. 73 END GetVector;
  75. 74
  76. 75 PROCEDURE SetVector(Int:WORD;Addr:FarADDRESS);
  77. 76 VAR
  78. 77 r : SYSTEM.Registers;
  79. 78 BEGIN
  80. 79 r.AH := 25H;
  81. 80 r.AL := BYTE(Int);
  82. 81 r.DS := SYSTEM.Seg(Addr^);
  83. 82 r.DX := SYSTEM.Ofs(Addr^);
  84. 83 Lib.Intr(r,21H); (* DOS Interrupt *)
  85. 84 END SetVector;
  86. 85
  87. 86 PROCEDURE SelectPort(Port:PortNos);
  88. 87 BEGIN
  89. 88 IF Installed THEN
  90. 89 UnInstall;
  91. 90 END; (*IF*)
  92. 91 CASE Port OF
  93. 92 1 : Base:=3F8H;
  94. 93 IntLevel:=4; |
  95. 94 2 : Base:=2F8H;
  96. 95 IntLevel:=3; |
  97. 96 3 : Base:=3E8H;
  98. 97 IntLevel:=4; |
  99. 98 4 : Base:=2E8H;
  100. 99 IntLevel:=3; |
  101. 100 END;
  102. 101 END SelectPort;
  103. 102
  104. 103 (*.............................................*)
  105. 104
  106. 105 PROCEDURE InitPort(Baud:CARDINAL;DataBits:Bits;StopBits:Stops;Parity:ParityCodes);
  107. 106 VAR
  108. 107 Divisor : CARDINAL;
  109. 108 LCRValue : SHORTCARD;
  110. 109 BEGIN
  111. 110 SYSTEM.Out(Base+LCR,80H); (* turn on DLAB to access the divisor *)
  112. 111 Divisor := CARDINAL(115200 DIV LONGCARD(Baud)); (* set the divisor *)
  113. 112 SYSTEM.Out(Base+DLL,SHORTCARD(Divisor MOD 256));
  114. 113 SYSTEM.Out(Base+DLM,SHORTCARD(Divisor DIV 256));
  115. 114 (* turn off the DLAB and set the new comm. parameters *)
  116. 115 LCRValue := SHORTCARD(ORD(Parity)*8+(StopBits-1)*4+(DataBits-5));
  117. 116 SYSTEM.Out(Base+LCR,LCRValue);
  118. 117 DCD := 7 IN BITSET(CARDINAL(SYSTEM.In(Base+MSR)));
  119. 118 Dummy := Pause();
  120. 119 CTS := 4 IN BITSET(CARDINAL(SYSTEM.In(Base+MSR)));
  121. 120 END InitPort;
  122. 121
  123. 122 (*.............................................*)
  124. 123
  125. 124 PROCEDURE TxInt;
  126. 125 VAR
  127. 126 tmp : CARDINAL;
  128. 127 BEGIN
  129. 128 WITH TxBuff DO
  130. 129 IF (rptr=wptr) OR (NoTx) THEN
  131. 130 TxIdle := TRUE
  132. 131 ELSE
  133. 132 TxIdle := FALSE;
  134. 133 tmp := rptr;
  135. 134 rptr := (rptr+1) MOD BuffSize;
  136. 135 SYSTEM.Out(Base+THR,SHORTCARD(Buff[tmp]));
  137. 136 END;
  138. 137 END;
  139. 138 END TxInt;
  140. 139
  141. 140 (*.............................................*)
  142. 141
  143. 142 PROCEDURE SetFlowControl(Which:FlowControls);
  144. 143 BEGIN
  145. 144 FlowCtrlType := Which;
  146. 145 IF Which=RtsCts THEN
  147. 146 NoTx := NOT CTS;
  148. 147 ELSE
  149. 148 NoTx := FALSE;
  150. 149 END;
  151. 150 IF TxIdle THEN
  152. 151 TxInt
  153. 152 END;
  154. 153 END SetFlowControl;
  155. 154
  156. 155 (*.............................................*)
  157. 156
  158. 157 PROCEDURE ControlFlow(Which:StopStart);
  159. 158 VAR
  160. 159 Ch : CHAR;
  161. 160 BEGIN
  162. 161 IF FlowCtrlType=XonXoff THEN
  163. 162 IF Which=Stop THEN
  164. 163 Ch:=XOFF
  165. 164 ELSE
  166. 165 Ch:=XON
  167. 166 END;
  168. 167 SerialWrite(Ch,1);
  169. 168 ELSIF FlowCtrlType=RtsCts THEN
  170. 169 IF Which=Stop THEN
  171. 170 Ch:=CHR(09H)
  172. 171 ELSE
  173. 172 Ch:=CHR(0BH)
  174. 173 END;
  175. 174 SYSTEM.Out(Base+MCR,SHORTCARD(Ch));
  176. 175 END;
  177. 176 END ControlFlow;
  178. 177
  179. 178 (*.............................................*)
  180. 179
  181. 180 (*# save, call(interrupt=>on, reg_saved=>(ax,bx,cx,dx,si,di,ds,es,st1,st2),reg_param=>(),same_ds=>off)*)
  182. 181 (* NB, The interrupt pragma sets up the registers as parameters to the *)
  183. 182 (* procedure in the order defined below. This allows easy access to *)
  184. 183 (* the entry registers. *)
  185. 184 PROCEDURE SerialInt;
  186. 185 VAR
  187. 186 c : CHAR;
  188. 187 IIRReg : SHORTCARD;
  189. 188 i : CARDINAL;
  190. 189 b,pic : BITSET;
  191. 190 BEGIN
  192. 191 (* Disable serial ints at the interrupt controller *)
  193. 192 pic := BITSET(SYSTEM.In(ICOCW1));
  194. 193 INCL(pic,IntLevel);
  195. 194 SYSTEM.Out(ICOCW1,SHORTCARD(pic));
  196. 195 SYSTEM.EI; (* now that serial ints are disabled we can allow other int types *)
  197. 196 LOOP
  198. 197 IIRReg := SYSTEM.In(Base+IIR);
  199. 198 IF ODD(IIRReg) THEN
  200. 199 EXIT;
  201. 200 END;
  202. 201 CASE IIRReg DIV 2 OF
  203. 202 0 : (* Modem Status - get CTS *)
  204. 203 b := BITSET(SYSTEM.In(Base+MSR));
  205. 204 IF 0 IN b THEN (* CTS has changed state *)
  206. 205 CTS := (4 IN b);
  207. 206 IF FlowCtrlType=RtsCts THEN
  208. 207 NoTx := (NOT CTS);
  209. 208 IF TxIdle THEN
  210. 209 TxInt;
  211. 210 END;
  212. 211 END;
  213. 212 END;
  214. 213 IF 3 IN b THEN (* DCD has changed state *)
  215. 214 DCD := (7 IN b);
  216. 215 END; |
  217. 216 1 : (* TxReady *)
  218. 217 TxInt; |
  219. 218 2 : (* RxReady *)
  220. 219 c := CHAR(SYSTEM.In(Base));
  221. 220 IF ((c=XOFF) OR (c=XON)) AND (FlowCtrlType=XonXoff) THEN
  222. 221 NoTx := (c=XOFF);
  223. 222 IF TxIdle THEN
  224. 223 TxInt;
  225. 224 END;
  226. 225 ELSE
  227. 226 WITH RxBuff DO
  228. 227 Buff[wptr] := CHAR(SYSTEM.In(Base));
  229. 228 wptr := (wptr+1) MOD BuffSize;
  230. 229 END;
  231. 230 SYSTEM.DI;
  232. 231 INC(RxCount);
  233. 232 SYSTEM.EI;
  234. 233 IF RxCount=HighWater THEN
  235. 234 ControlFlow(Stop);
  236. 235 END;
  237. 236 END; |
  238. 237 3 : (* Rx Line Status - check for error and clear *)
  239. 238 b := BITSET(SYSTEM.In(Base+LSR));
  240. 239 b := BITSET(SYSTEM.In(Base));
  241. 240 (* clear rcv reg also *) |
  242. 241 END;
  243. 242 END;
  244. 243 EXCL(pic,IntLevel); (* reenable serial ints at the int controller *)
  245. 244 SYSTEM.Out(ICOCW1,SHORTCARD(pic));
  246. 245 SYSTEM.Out(ICOCW2,SHORTCARD(60H+IntLevel)); (* send specific EOI to 8259 *)
  247. 246 END SerialInt;
  248. 247 (*# restore *)
  249. 248
  250. 249 (*.............................................*)
  251. 250
  252. 251 PROCEDURE Install;
  253. 252 VAR
  254. 253 x,IIRReg : SHORTCARD;
  255. 254 b : BITSET;
  256. 255 BEGIN
  257. 256 UnInstall;
  258. 257 SYSTEM.DI;
  259. 258 SYSTEM.Out(Base+IER,0); (* disable serial ints while we set things up. *)
  260. 259 SYSTEM.EI;
  261. 260 SetVector(IntLevel+8,FarADR(SerialInt));
  262. 261 RxBuff.rptr := 0; (* initialise ring buffer pointers & other vars *)
  263. 262 RxBuff.wptr := 0;
  264. 263 TxBuff.rptr := 0;
  265. 264 TxBuff.wptr := 0;
  266. 265 RxCount := 0;
  267. 266 TxIdle := TRUE;
  268. 267 NoTx := FALSE;
  269. 268 SYSTEM.Out(Base+MCR,10H); (* put 8250 UART into loopback mode *)
  270. 269 REPEAT
  271. 270 b := BITSET(SYSTEM.In(Base+LSR)); (* wait for tx path to empty *)
  272. 271 UNTIL (6 IN b);
  273. 272 WHILE ODD(SYSTEM.In(Base+LSR)) DO (* clear out rx path *)
  274. 273 x := SYSTEM.In(Base);
  275. 274 END;
  276. 275 Dummy := Pause();
  277. 276 SYSTEM.Out(Base+IER,0FH); (* enable all four types of serial interrupt *)
  278. 277 Dummy := Pause();
  279. 278 SYSTEM.Out(Base+MCR,0BH); (* Raise DTR,RTS and OUT2 *)
  280. 279 Dummy := Pause();
  281. 280 LOOP
  282. 281 Dummy := Pause();
  283. 282 (* force reads from int. identification reg until it clears *)
  284. 283 IIRReg := SYSTEM.In(Base+IIR);
  285. 284 IF ODD(IIRReg) THEN
  286. 285 EXIT;
  287. 286 END;
  288. 287 CASE IIRReg DIV 2 OF
  289. 288 0 : x:=SYSTEM.In(Base+MSR); |
  290. 289 1 : (* TxIdle -- ignore *) |
  291. 290 2 : x:=SYSTEM.In(Base); |
  292. 291 3 : (* Rx Line Status *)
  293. 292 x:=SYSTEM.In(Base+LSR);
  294. 293 x:=SYSTEM.In(Base); |
  295. 294 END;
  296. 295 END;
  297. 296 DCD := 7 IN BITSET(CARDINAL(SYSTEM.In(Base+MSR)));
  298. 297 Dummy := Pause();
  299. 298 CTS := 4 IN BITSET(CARDINAL(SYSTEM.In(Base+MSR)));
  300. 299 NoTx := (NOT CTS) AND (FlowCtrlType=RtsCts);
  301. 300 (* Enable level 4 or level 3 interrupt in interrupt controller *)
  302. 301 b := BITSET(SYSTEM.In(ICOCW1));
  303. 302 EXCL(b,IntLevel);
  304. 303 Dummy := Pause();
  305. 304 SYSTEM.Out(ICOCW1,SHORTCARD(b));
  306. 305 Dummy := Pause();
  307. 306 SYSTEM.Out(ICOCW2,SHORTCARD(IntLevel)+60H); (* EOI to int controller to clr it *)
  308. 307 Installed := TRUE;
  309. 308 END Install;
  310. 309
  311. 310 (*.............................................*)
  312. 311
  313. 312 PROCEDURE CarrierDetect():BOOLEAN;
  314. 313 BEGIN
  315. 314 RETURN DCD;
  316. 315 END CarrierDetect;
  317. 316
  318. 317 (*.............................................*)
  319. 318
  320. 319 PROCEDURE UnInstall;
  321. 320 VAR
  322. 321 b : BITSET;
  323. 322 BEGIN
  324. 323 (* Disable level 4 or level 3 interrupt in interrupt controller *)
  325. 324 b := BITSET(SYSTEM.In(ICOCW1));
  326. 325 INCL(b,IntLevel);
  327. 326 Dummy := Pause();
  328. 327 SYSTEM.Out(ICOCW1,SHORTCARD(b));
  329. 328 Dummy := Pause();
  330. 329 SYSTEM.Out(Base+IER,0); (* Disable interrupt from 8250 *)
  331. 330 Dummy := Pause();
  332. 331 SYSTEM.Out(Base+MCR,0); (* drop DTR and RTS *)
  333. 332 SetVector(IntLevel+8,OldVector);
  334. 333 Installed := FALSE;
  335. 334 END UnInstall;
  336. 335
  337. 336 (*.............................................*)
  338. 337
  339. 338 (*# save,call(o_a_copy=>off)*)
  340. 339 PROCEDURE SerialWrite(b:ARRAY OF CHAR; Lnth:CARDINAL);
  341. 340 VAR
  342. 341 c : CHAR;
  343. 342 i,neww : CARDINAL;
  344. 343 BEGIN
  345. 344 IF Hooked THEN
  346. 345 TxHook(b,Lnth);
  347. 346 END; (*IF*)
  348. 347 i:=0;
  349. 348 WHILE i<Lnth DO
  350. 349 c := b[i];
  351. 350 WITH TxBuff DO
  352. 351 neww := (wptr+1) MOD BuffSize;
  353. 352 WHILE (neww=rptr) DO
  354. 353 (* wait if buffer is about to overflow *)
  355. 354 END;
  356. 355 Buff[wptr] := c;
  357. 356 wptr := neww;
  358. 357 END;
  359. 358 IF TxIdle THEN
  360. 359 TxInt;
  361. 360 END;
  362. 361 INC(i);
  363. 362 END;
  364. 363 END SerialWrite;
  365. 364 (*# restore *)
  366. 365
  367. 366 (*.............................................*)
  368. 367
  369. 368 PROCEDURE SerialRead(VAR c:CHAR; t:CARDINAL):BOOLEAN;
  370. 369 VAR
  371. 370 t2 : CARDINAL;
  372. 371 BEGIN
  373. 372 WITH RxBuff DO
  374. 373 IF (t>0) AND (rptr=wptr) THEN
  375. 374 (* if t>0 then wait "t" tenth/secs for char to arrive *)
  376. 375 WHILE (rptr=wptr) AND (t>0) DO
  377. 376 t2:=50;
  378. 377 WHILE (rptr=wptr) AND (t2>0) DO
  379. 378 Lib.Delay(2);
  380. 379 DEC(t2);
  381. 380 END;
  382. 381 DEC(t);
  383. 382 END;
  384. 383 END;
  385. 384 IF Hooked THEN
  386. 385 RxHook(c);
  387. 386 END; (*IF*)
  388. 387 IF rptr=wptr THEN
  389. 388 RETURN FALSE;
  390. 389 ELSE
  391. 390 c := Buff[rptr];
  392. 391 rptr := (rptr+1) MOD BuffSize;
  393. 392 SYSTEM.DI;
  394. 393 DEC(RxCount);
  395. 394 SYSTEM.EI;
  396. 395 IF RxCount=LowWater THEN
  397. 396 ControlFlow(Start);
  398. 397 END;
  399. 398 RETURN TRUE
  400. 399 END;
  401. 400 END;
  402. 401 END SerialRead;
  403. 402
  404. 403 (*.............................................*)
  405. 404
  406. 405 PROCEDURE FlushInBuf;
  407. 406 BEGIN
  408. 407 SYSTEM.DI;
  409. 408 RxBuff.rptr := 0;
  410. 409 RxBuff.wptr := 0;
  411. 410 SYSTEM.EI;
  412. 411 END FlushInBuf;
  413. 412
  414. 413 (*.............................................*)
  415. 414
  416. 415 PROCEDURE SetBreak(Tenths:CARDINAL);
  417. 416 VAR
  418. 417 b : BITSET;
  419. 418 BEGIN
  420. 419 b := BITSET(SYSTEM.In(Base+LCR));
  421. 420 Dummy := Pause();
  422. 421 SYSTEM.Out(Base+LCR,SHORTCARD(b+{6}));
  423. 422 Lib.Delay(Tenths*100);
  424. 423 SYSTEM.Out(Base+LCR,SHORTCARD(b));
  425. 424 END SetBreak;
  426. 425
  427. 426 (*.............................................*)
  428. 427
  429. 428 PROCEDURE AddTxHook(Hook:TxHookProc;VAR OldHook:TxHookProc);
  430. 429 BEGIN
  431. 430 OldHook := TxHook;
  432. 431 TxHook := Hook;
  433. 432 END AddTxHook;
  434. 433
  435. 434 PROCEDURE AddRxHook(Hook:RxHookProc;VAR OldHook:RxHookProc);
  436. 435 BEGIN
  437. 436 OldHook := RxHook;
  438. 437 RxHook := Hook;
  439. 438 END AddRxHook;
  440. 439
  441. 440 PROCEDURE TermProc;
  442. 441 BEGIN
  443. 442 UnInstall();
  444. 443 Continue();
  445. 444 END TermProc;
  446. 445
  447. 446 (*................................................*)
  448. 447
  449. 448 BEGIN (*RS232*)
  450. 449 Base := 3F8H;
  451. 450 IntLevel := 4;
  452. 451 FlowCtrlType := RtsCts;
  453. 452 OldVector := GetVector(IntLevel+8);
  454. 453 Lib.Terminate(TermProc,Continue);
  455. 454 Hooked := FALSE;
  456. 455 RxHook := NULLPROC;
  457. 456 TxHook := NULLPROC;
  458. 457 Installed := FALSE;
  459. 458 END RS232.
  460. 459 (*%E*)
  461. 460 (*%T _OS2*)
  462. 461 (* OS/2 version *)
  463. 462 IMPORT Dos;
  464. 463
  465. 464 TYPE
  466. 465 Byte = SHORTCARD[0..7];
  467. 466 ByteSet = SET OF BYTE;
  468. ***** ^ undeclared identifier
  469. 467 DCBType = RECORD
  470. 468 write,read : CARDINAL;
  471. 469 flag1,flag2,
  472. 470 flag3 : ByteSet;
  473. 471 error,break,
  474. 472 xon,xoff : CHAR;
  475. 473 END;
  476. ***** ^ not supported yet
  477. 474
  478. 475 VAR
  479. 476 PortNum : CARDINAL;
  480. 477 Handle : CARDINAL;
  481. 478 CurrBaud : CARDINAL;
  482. 479 CurrData : Bits;
  483. ***** ^ undeclared identifier
  484. 480 CurrStop : Stops;
  485. ***** ^ undeclared identifier
  486. 481 CurrParity : ParityCodes;
  487. ***** ^ undeclared identifier
  488. 482 CurrFlow : FlowControls;
  489. ***** ^ undeclared identifier
  490. 483 CurrTime : CARDINAL;
  491. 484 Locked,Installed : BOOLEAN;
  492. 485 Null : FarADDRESS;
  493. ***** ^ undeclared identifier
  494. 486
  495. 487 PROCEDURE SelectPort(Port:PortNos);
  496. ***** ^ undeclared identifier
  497. 488 BEGIN
  498. 489 IF NOT Locked THEN
  499. 490 IF Installed THEN
  500. 491 UnInstall;
  501. ***** ^ undeclared identifier
  502. 492 END; (*IF*)
  503. 493 PortNum := Port;
  504. ***** ^ not supported yet
  505. 494 END;
  506. 495 END SelectPort;
  507. ***** ^ not supported yet
  508. 496
  509. 497 PROCEDURE InitPort2;
  510. 498 TYPE
  511. 499 ParsType = ARRAY ParityCodes OF SHORTCARD;
  512. ***** ^ undeclared identifier
  513. ***** ^ not supported yet
  514. 500 CONST
  515. 501 Pars = ParsType(0,1,0,2,0,3,0,4);
  516. ***** ^ not supported yet
  517. 502 VAR
  518. 503 char : RECORD
  519. 504 data,
  520. 505 parity,
  521. 506 stop : SHORTCARD;
  522. 507 END;
  523. ***** ^ not supported yet
  524. 508 BEGIN
  525. 509 Dos.DevIOCtl(Null,FarADR(CurrBaud),41H,1,Handle);
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. ***** ^ undeclared identifier
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. 510 WITH char DO
  533. ***** ^ not supported yet
  534. 511 data := SHORTCARD(CurrData);
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. 512 parity := Pars[CurrParity];
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. 513 IF CurrStop = 2 THEN
  541. ***** ^ not supported yet
  542. 514 stop := 2;
  543. ***** ^ not supported yet
  544. ***** ^ incompatible assignment
  545. 515 ELSE
  546. 516 stop := 0;
  547. ***** ^ not supported yet
  548. ***** ^ incompatible assignment
  549. 517 END;
  550. 518 END;
  551. ***** ^ not supported yet
  552. 519 Dos.DevIOCtl(Null,FarADR(char),42H,1,Handle);
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ undeclared identifier
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. 520 END InitPort2;
  560. ***** ^ not supported yet
  561. 521
  562. 522 PROCEDURE InitPort(Baud:CARDINAL;DataBits:Bits;StopBits:Stops;Parity:ParityCodes);
  563. ***** ^ undeclared identifier
  564. ***** ^ undeclared identifier
  565. ***** ^ undeclared identifier
  566. 523 BEGIN
  567. 524 IF NOT Locked THEN
  568. 525 CurrBaud := Baud;
  569. 526 CurrData := DataBits;
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. 527 CurrStop := StopBits;
  573. ***** ^ not supported yet
  574. ***** ^ not supported yet
  575. 528 CurrParity := Parity;
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. 529 IF Handle # MAX(CARDINAL) THEN
  579. ***** ^ undeclared identifier
  580. ***** ^ not supported yet
  581. 530 InitPort2;
  582. ***** ^ not supported yet
  583. 531 END;
  584. 532 END;
  585. 533 END InitPort;
  586. ***** ^ not supported yet
  587. 534
  588. 535 PROCEDURE SetFlowControl(Which:FlowControls);
  589. ***** ^ undeclared identifier
  590. 536 VAR
  591. 537 dcb : DCBType;
  592. ***** ^ not supported yet
  593. 538 BEGIN
  594. 539 IF NOT Locked THEN
  595. 540 CurrFlow := Which;
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. 541 IF Handle # MAX(CARDINAL) THEN
  599. ***** ^ undeclared identifier
  600. ***** ^ not supported yet
  601. 542 Dos.DevIOCtl(FarADR(dcb),Null,73H,1,Handle);
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. ***** ^ undeclared identifier
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. ***** ^ not supported yet
  608. 543 WITH dcb DO
  609. ***** ^ not supported yet
  610. 544 EXCL(flag2,7);
  611. ***** ^ undeclared identifier
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. 545 INCL(flag2,6);
  615. ***** ^ undeclared identifier
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. 546 EXCL(flag2,1);
  619. ***** ^ undeclared identifier
  620. ***** ^ not supported yet
  621. ***** ^ not supported yet
  622. 547 EXCL(flag2,0);
  623. ***** ^ undeclared identifier
  624. ***** ^ not supported yet
  625. ***** ^ not supported yet
  626. 548 CASE Which OF
  627. ***** ^ not supported yet
  628. 549 NoFlowControl : ; (* already set *) |
  629. ***** ^ undeclared identifier
  630. 550 RtsCts : INCL(flag2,7);
  631. ***** ^ undeclared identifier
  632. ***** ^ undeclared identifier
  633. ***** ^ not supported yet
  634. ***** ^ not supported yet
  635. 551 EXCL(flag2,6); |
  636. ***** ^ undeclared identifier
  637. ***** ^ not supported yet
  638. ***** ^ not supported yet
  639. 552 XonXoff : INCL(flag2,1);
  640. ***** ^ undeclared identifier
  641. ***** ^ undeclared identifier
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. 553 INCL(flag2,0); |
  645. ***** ^ undeclared identifier
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 554 END;
  649. 555 END;
  650. ***** ^ not supported yet
  651. 556 Dos.DevIOCtl(Null,FarADR(dcb),53H,1,Handle);
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. ***** ^ not supported yet
  655. ***** ^ undeclared identifier
  656. ***** ^ not supported yet
  657. ***** ^ not supported yet
  658. 557 END;
  659. 558 END;
  660. 559 END SetFlowControl;
  661. ***** ^ not supported yet
  662. 560
  663. 561 PROCEDURE SetRdTime(time:CARDINAL);
  664. 562 VAR
  665. 563 dcb : DCBType;
  666. ***** ^ not supported yet
  667. 564 BEGIN
  668. 565 Dos.DevIOCtl(FarADR(dcb),Null,73H,1,Handle);
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ undeclared identifier
  672. ***** ^ not supported yet
  673. ***** ^ not supported yet
  674. ***** ^ not supported yet
  675. 566 WITH dcb DO
  676. ***** ^ not supported yet
  677. 567 INCL(flag3,1);
  678. ***** ^ undeclared identifier
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. 568 IF time = 0 THEN
  682. 569 INCL(flag3,2);
  683. ***** ^ undeclared identifier
  684. ***** ^ not supported yet
  685. ***** ^ not supported yet
  686. 570 read := 0;
  687. ***** ^ not supported yet
  688. ***** ^ incompatible assignment
  689. 571 ELSE
  690. 572 IF time = MAX(CARDINAL) THEN
  691. ***** ^ undeclared identifier
  692. ***** ^ not supported yet
  693. 573 read := 0;
  694. ***** ^ not supported yet
  695. ***** ^ incompatible assignment
  696. 574 ELSE
  697. 575 read := time*10-1;
  698. ***** ^ not supported yet
  699. ***** ^ incompatible assignment
  700. 576 END;
  701. 577 EXCL(flag3,2);
  702. ***** ^ undeclared identifier
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. 578 END;
  706. 579 END;
  707. ***** ^ not supported yet
  708. 580 Dos.DevIOCtl(Null,FarADR(dcb),53H,1,Handle);
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. ***** ^ undeclared identifier
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. 581 CurrTime := time;
  716. 582 END SetRdTime;
  717. ***** ^ not supported yet
  718. 583
  719. 584 PROCEDURE SetWrTime(time:CARDINAL);
  720. 585 VAR
  721. 586 dcb : DCBType;
  722. ***** ^ not supported yet
  723. 587 BEGIN
  724. 588 Dos.DevIOCtl(FarADR(dcb),Null,73H,1,Handle);
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ undeclared identifier
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. 589 WITH dcb DO
  732. ***** ^ not supported yet
  733. 590 IF time = 0 THEN
  734. 591 INCL(flag3,0);
  735. ***** ^ undeclared identifier
  736. ***** ^ not supported yet
  737. ***** ^ not supported yet
  738. 592 ELSE
  739. 593 IF time = MAX(CARDINAL) THEN
  740. ***** ^ undeclared identifier
  741. ***** ^ not supported yet
  742. 594 write := 0;
  743. ***** ^ not supported yet
  744. ***** ^ incompatible assignment
  745. 595 ELSE
  746. 596 write := time*10-1;
  747. ***** ^ not supported yet
  748. ***** ^ incompatible assignment
  749. 597 END;
  750. 598 EXCL(flag3,0);
  751. ***** ^ undeclared identifier
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. 599 END;
  755. 600 END;
  756. ***** ^ not supported yet
  757. 601 Dos.DevIOCtl(Null,FarADR(dcb),53H,1,Handle);
  758. ***** ^ not supported yet
  759. ***** ^ not supported yet
  760. ***** ^ not supported yet
  761. ***** ^ undeclared identifier
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. 602 END SetWrTime;
  765. ***** ^ not supported yet
  766. 603
  767. 604 PROCEDURE UnInstall2;
  768. 605 VAR
  769. 606 tmp : CARDINAL;
  770. 607 BEGIN
  771. 608 IF Handle # MAX(CARDINAL) THEN
  772. ***** ^ undeclared identifier
  773. ***** ^ not supported yet
  774. 609 tmp := Handle;
  775. 610 Handle := MAX(CARDINAL);
  776. ***** ^ undeclared identifier
  777. ***** ^ not supported yet
  778. 611 SetRdTime(MAX(CARDINAL));
  779. ***** ^ not supported yet
  780. ***** ^ undeclared identifier
  781. ***** ^ not supported yet
  782. 612 SetWrTime(MAX(CARDINAL));
  783. ***** ^ not supported yet
  784. ***** ^ undeclared identifier
  785. ***** ^ not supported yet
  786. 613 Dos.Close(tmp);
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. 614 END;
  791. 615 END UnInstall2;
  792. ***** ^ not supported yet
  793. 616
  794. 617 PROCEDURE Install;
  795. 618 TYPE
  796. 619 NamesType = ARRAY PortNos OF ARRAY[0..4] OF CHAR;
  797. ***** ^ undeclared identifier
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. 620 CONST
  801. 621 Names = NamesType('COM1'+0C,'COM2'+0C,'COM3'+0C,'NUL'+0C);
  802. ***** ^ not supported yet
  803. ***** ^ arithmetic operand must be numeric
  804. ***** ^ not supported yet
  805. ***** ^ arithmetic operand must be numeric
  806. ***** ^ not supported yet
  807. ***** ^ arithmetic operand must be numeric
  808. ***** ^ not supported yet
  809. ***** ^ arithmetic operand must be numeric
  810. 622 VAR
  811. 623 r : CARDINAL;
  812. 624 a : CARDINAL;
  813. 625 BEGIN
  814. 626 Dos.EnterCritSec();
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. ***** ^ not supported yet
  818. 627 IF NOT Locked THEN
  819. 628 Locked := TRUE;
  820. 629 Dos.ExitCritSec();
  821. ***** ^ not supported yet
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. 630 UnInstall2;
  825. ***** ^ not supported yet
  826. 631 r := Dos.Open(Names[PortNum],Handle,a,0,0,1,CARDINAL({13,7,4,1}),0);
  827. ***** ^ not supported yet
  828. ***** ^ not supported yet
  829. ***** ^ not supported yet
  830. ***** ^ not supported yet
  831. ***** ^ not supported yet
  832. ***** ^ not supported yet
  833. ***** ^ not supported yet
  834. ***** ^ not supported yet
  835. 632 IF r = 0 THEN
  836. 633 InitPort2;
  837. ***** ^ not supported yet
  838. 634 SetFlowControl(CurrFlow);
  839. ***** ^ not supported yet
  840. ***** ^ not supported yet
  841. 635 SetRdTime(MAX(CARDINAL));
  842. ***** ^ not supported yet
  843. ***** ^ undeclared identifier
  844. ***** ^ not supported yet
  845. 636 SetWrTime(600);
  846. ***** ^ not supported yet
  847. ***** ^ not supported yet
  848. 637 Installed := TRUE;
  849. 638 ELSE
  850. 639 Handle := MAX(CARDINAL);
  851. ***** ^ undeclared identifier
  852. ***** ^ not supported yet
  853. 640 END;
  854. 641 Locked := FALSE;
  855. 642 ELSE
  856. 643 Dos.ExitCritSec();
  857. ***** ^ not supported yet
  858. ***** ^ not supported yet
  859. ***** ^ not supported yet
  860. 644 END;
  861. 645 END Install;
  862. ***** ^ not supported yet
  863. 646
  864. 647 PROCEDURE CarrierDetect():BOOLEAN;
  865. 648 VAR
  866. 649 r : CARDINAL;
  867. 650 mcis : ByteSet;
  868. ***** ^ not supported yet
  869. 651 BEGIN
  870. 652 IF NOT Locked AND (Handle # MAX(CARDINAL)) THEN
  871. ***** ^ undeclared identifier
  872. ***** ^ not supported yet
  873. 653 r := Dos.DevIOCtl(FarADR(mcis),Null,67H,1,Handle);
  874. ***** ^ not supported yet
  875. ***** ^ not supported yet
  876. ***** ^ undeclared identifier
  877. ***** ^ not supported yet
  878. ***** ^ not supported yet
  879. ***** ^ not supported yet
  880. 654 RETURN (r = 0) AND (7 IN mcis);
  881. ***** ^ not supported yet
  882. 655 ELSE
  883. 656 RETURN FALSE;
  884. 657 END;
  885. 658 END CarrierDetect;
  886. ***** ^ not supported yet
  887. 659
  888. 660 PROCEDURE UnInstall;
  889. 661 VAR
  890. 662 tmp : CARDINAL;
  891. 663 BEGIN
  892. 664 Dos.EnterCritSec();
  893. ***** ^ not supported yet
  894. ***** ^ not supported yet
  895. ***** ^ not supported yet
  896. 665 IF NOT Locked THEN
  897. 666 Locked := TRUE;
  898. 667 Dos.ExitCritSec();
  899. ***** ^ not supported yet
  900. ***** ^ not supported yet
  901. ***** ^ not supported yet
  902. 668 UnInstall2;
  903. ***** ^ not supported yet
  904. 669 Locked := FALSE;
  905. 670 Installed := FALSE;
  906. 671 ELSE
  907. 672 Dos.ExitCritSec();
  908. ***** ^ not supported yet
  909. ***** ^ not supported yet
  910. ***** ^ not supported yet
  911. 673 END;
  912. 674 END UnInstall;
  913. ***** ^ not supported yet
  914. 675
  915. 676 (*# save, call(o_a_copy => off), check(index=>off) *)
  916. 677 PROCEDURE SerialWrite(b:ARRAY OF CHAR; Lnth:CARDINAL);
  917. ***** ^ not supported yet
  918. 678 VAR
  919. 679 cnt,pos : CARDINAL;
  920. 680 BEGIN
  921. 681 IF NOT Locked AND (Handle # MAX(CARDINAL)) THEN
  922. ***** ^ undeclared identifier
  923. ***** ^ not supported yet
  924. 682 IF Hooked THEN
  925. ***** ^ undeclared identifier
  926. 683 TxHook(b,Lnth);
  927. ***** ^ undeclared identifier
  928. ***** ^ not supported yet
  929. ***** ^ not supported yet
  930. 684 END; (*IF*)
  931. 685 pos := 0;
  932. 686 WHILE Lnth-pos # 0 DO
  933. 687 Dos.Write(Handle,FarADR(b[pos]),Lnth-pos,cnt);
  934. ***** ^ not supported yet
  935. ***** ^ not supported yet
  936. ***** ^ undeclared identifier
  937. ***** ^ not supported yet
  938. ***** ^ not supported yet
  939. ***** ^ not supported yet
  940. 688 INC(pos,cnt);
  941. ***** ^ undeclared identifier
  942. ***** ^ not supported yet
  943. 689 END;
  944. 690 END;
  945. 691 END SerialWrite;
  946. ***** ^ not supported yet
  947. 692 (*# restore *)
  948. 693
  949. 694 PROCEDURE SerialRead(VAR c:CHAR; t:CARDINAL):BOOLEAN;
  950. 695 VAR
  951. 696 r : CARDINAL;
  952. 697 len : CARDINAL;
  953. 698 BEGIN
  954. 699 IF NOT Locked AND (Handle # MAX(CARDINAL)) THEN
  955. ***** ^ undeclared identifier
  956. ***** ^ not supported yet
  957. 700 IF t # CurrTime THEN
  958. 701 SetRdTime(t);
  959. ***** ^ not supported yet
  960. ***** ^ not supported yet
  961. 702 END;
  962. 703 r := Dos.Read(Handle,FarADR(c),1,len);
  963. ***** ^ not supported yet
  964. ***** ^ not supported yet
  965. ***** ^ undeclared identifier
  966. ***** ^ not supported yet
  967. ***** ^ not supported yet
  968. 704 IF Hooked THEN
  969. ***** ^ undeclared identifier
  970. 705 RxHook(c);
  971. ***** ^ undeclared identifier
  972. ***** ^ not supported yet
  973. 706 END; (*IF*)
  974. 707 RETURN (r = 0) AND (len # 0);
  975. 708 ELSE
  976. 709 RETURN FALSE;
  977. 710 END;
  978. 711 END SerialRead;
  979. ***** ^ not supported yet
  980. 712
  981. 713 PROCEDURE FlushInBuf;
  982. 714 VAR
  983. 715 Return : RECORD
  984. 716 Chars,
  985. 717 QSize : CARDINAL;
  986. 718 END; (*RECORD*)
  987. ***** ^ not supported yet
  988. 719 i : CARDINAL;
  989. 720 void : ARRAY[0..128] OF BYTE;
  990. ***** ^ not supported yet
  991. ***** ^ undeclared identifier
  992. 721 BEGIN
  993. 722 Dos.DevIOCtl(FarADR(Return),Null,68H,1,Handle);
  994. ***** ^ not supported yet
  995. ***** ^ not supported yet
  996. ***** ^ undeclared identifier
  997. ***** ^ not supported yet
  998. ***** ^ not supported yet
  999. ***** ^ not supported yet
  1000. 723 WHILE Return.Chars > 0 DO
  1001. ***** ^ not supported yet
  1002. ***** ^ not supported yet
  1003. 724 IF Return.Chars > SIZE(void) THEN
  1004. ***** ^ not supported yet
  1005. ***** ^ not supported yet
  1006. ***** ^ undeclared identifier
  1007. ***** ^ not supported yet
  1008. 725 i := SIZE(void);
  1009. ***** ^ undeclared identifier
  1010. ***** ^ not supported yet
  1011. 726 ELSE
  1012. 727 i := Return.Chars;
  1013. ***** ^ not supported yet
  1014. ***** ^ not supported yet
  1015. 728 END; (*IF*)
  1016. 729 Dos.Read(Handle,FarADR(void),i,i);
  1017. ***** ^ not supported yet
  1018. ***** ^ not supported yet
  1019. ***** ^ undeclared identifier
  1020. ***** ^ not supported yet
  1021. ***** ^ not supported yet
  1022. 730 DEC(Return.Chars,i);
  1023. ***** ^ undeclared identifier
  1024. ***** ^ not supported yet
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. 731 END; (*WHILE*)
  1028. 732 END FlushInBuf;
  1029. ***** ^ not supported yet
  1030. 733
  1031. 734 PROCEDURE SetBreak(Tenths:CARDINAL);
  1032. 735 VAR
  1033. 736 err : CARDINAL;
  1034. 737 BEGIN
  1035. 738 IF NOT Locked AND (Handle # MAX(CARDINAL)) THEN
  1036. ***** ^ undeclared identifier
  1037. ***** ^ not supported yet
  1038. 739 Dos.DevIOCtl(FarADR(err),Null,4BH,1,Handle);
  1039. ***** ^ not supported yet
  1040. ***** ^ not supported yet
  1041. ***** ^ undeclared identifier
  1042. ***** ^ not supported yet
  1043. ***** ^ not supported yet
  1044. ***** ^ not supported yet
  1045. 740 Dos.Sleep(VAL(LONGCARD,Tenths)*100);
  1046. ***** ^ not supported yet
  1047. ***** ^ not supported yet
  1048. ***** ^ undeclared identifier
  1049. ***** ^ undeclared identifier
  1050. ***** ^ not supported yet
  1051. ***** ^ not supported yet
  1052. 741 Dos.DevIOCtl(FarADR(err),Null,45H,1,Handle);
  1053. ***** ^ not supported yet
  1054. ***** ^ not supported yet
  1055. ***** ^ undeclared identifier
  1056. ***** ^ not supported yet
  1057. ***** ^ not supported yet
  1058. ***** ^ not supported yet
  1059. 742 END;
  1060. 743 END SetBreak;
  1061. ***** ^ not supported yet
  1062. 744
  1063. 745 PROCEDURE AddTxHook(Hook:TxHookProc;VAR OldHook:TxHookProc);
  1064. ***** ^ undeclared identifier
  1065. ***** ^ undeclared identifier
  1066. 746 BEGIN
  1067. 747 OldHook := TxHook;
  1068. ***** ^ not supported yet
  1069. ***** ^ undeclared identifier
  1070. 748 TxHook := Hook;
  1071. ***** ^ undeclared identifier
  1072. ***** ^ not supported yet
  1073. 749 END AddTxHook;
  1074. ***** ^ not supported yet
  1075. 750
  1076. 751 PROCEDURE AddRxHook(Hook:RxHookProc;VAR OldHook:RxHookProc);
  1077. ***** ^ undeclared identifier
  1078. ***** ^ undeclared identifier
  1079. 752 BEGIN
  1080. 753 OldHook := RxHook;
  1081. ***** ^ not supported yet
  1082. ***** ^ undeclared identifier
  1083. 754 RxHook := Hook;
  1084. ***** ^ undeclared identifier
  1085. ***** ^ not supported yet
  1086. 755 END AddRxHook;
  1087. ***** ^ not supported yet
  1088. 756
  1089. 757
  1090. 758 BEGIN (*RS232*)
  1091. 759 Handle := MAX(CARDINAL);
  1092. ***** ^ undeclared identifier
  1093. ***** ^ not supported yet
  1094. 760 CurrBaud := 1200;
  1095. 761 CurrData := 8;
  1096. ***** ^ not supported yet
  1097. 762 CurrStop := 1;
  1098. ***** ^ not supported yet
  1099. 763 CurrParity := None;
  1100. ***** ^ not supported yet
  1101. ***** ^ undeclared identifier
  1102. 764 CurrFlow := RtsCts;
  1103. ***** ^ not supported yet
  1104. ***** ^ undeclared identifier
  1105. 765 Locked := FALSE;
  1106. 766 Null := FarNIL;
  1107. ***** ^ not supported yet
  1108. ***** ^ undeclared identifier
  1109. 767 SelectPort(1);
  1110. ***** ^ not supported yet
  1111. ***** ^ not supported yet
  1112. 768 Hooked := FALSE;
  1113. ***** ^ undeclared identifier
  1114. 769 RxHook := NULLPROC;
  1115. ***** ^ undeclared identifier
  1116. ***** ^ undeclared identifier
  1117. 770 TxHook := NULLPROC;
  1118. ***** ^ undeclared identifier
  1119. ***** ^ undeclared identifier
  1120. 771 Installed := FALSE;
  1121. 772 END RS232.
  1122. ***** ^ not supported yet
  1123. 773 (*%E*)
  1124. 774
  1125. 349 errors