MINITERM.LST 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * MINITERM.MOD - COMMS Toolkit demonstration program *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1988..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 MODULE MiniTerm;
  13. 12 IMPORT RS232,Window,IO;
  14. 13
  15. 14 CONST
  16. 15 Port = 2;
  17. 16 Baud = 2400;
  18. 17 Bits = 8;
  19. 18 Stops = 1;
  20. 19 Parity = RS232.None;
  21. ***** ^ not supported yet
  22. ***** ^ not supported yet
  23. 20
  24. 21 VAR
  25. 22 c : CHAR;
  26. 23
  27. 24 BEGIN
  28. 25 Window.Clear;
  29. ***** ^ not supported yet
  30. ***** ^ not supported yet
  31. 26 RS232.SelectPort(Port);
  32. ***** ^ not supported yet
  33. ***** ^ not supported yet
  34. ***** ^ not supported yet
  35. 27 RS232.InitPort(Baud,Bits,Stops,Parity);
  36. ***** ^ not supported yet
  37. ***** ^ not supported yet
  38. ***** ^ not supported yet
  39. 28 RS232.Install;
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. 29 LOOP
  43. 30 WHILE RS232.SerialRead(c,0) DO (* test remote *)
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 31 IO.WrChar(c);
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. 32 END;
  52. 33 IF IO.KeyPressed() THEN
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 34 c := IO.RdKey();
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. 35 IF c=0C THEN (* special key? *)
  61. 36 c := IO.RdKey();
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. 37 IF c=CHR(68) THEN (* function key 10 *)
  66. ***** ^ undeclared identifier
  67. ***** ^ not supported yet
  68. 38 EXIT;
  69. 39 END;
  70. 40 ELSE
  71. 41 RS232.SerialWrite(c,1);
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 42 END;
  76. 43 END;
  77. 44 END;
  78. 45 RS232.UnInstall;
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 46 END MiniTerm.
  82. 47
  83. 34 errors