SAMPLE04.LST 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. Listing:
  2. 1 (******************************************************************************)
  3. 2 (* SAMPLE04.MOD *)
  4. 3 (* *)
  5. 4 (* metaPort Usage *)
  6. 5 (* Taken from SAMPLE04.PAS - Metagraphics Software Corporation (c) 1987-1989 *)
  7. 6 (* *)
  8. 7 (* PSW 10/31/90 09:07pm *)
  9. 8 (******************************************************************************)
  10. 9
  11. 10 MODULE Sample04;
  12. 11 (*
  13. 12 * Graphix
  14. 13 * Release 3.7
  15. 14 * (c) Copyright 1986-1992 PMI
  16. 15 * Green Bay, Wisconsin
  17. 16 * (414) 468-6040
  18. 17 * All rights reserved
  19. 18 *
  20. 19 *)
  21. 20
  22. 21 IMPORT GrQry;
  23. 22 IMPORT GrConst;
  24. 23 IMPORT GrPorts;
  25. 24 IMPORT Meta;
  26. 25 IMPORT IO;
  27. 26
  28. 27 VAR
  29. 28 GrafixCard,
  30. 29 CommPort: INTEGER;
  31. 30 i, j, k: INTEGER;
  32. 31 scrnR: GrConst.rect;
  33. ***** ^ not supported yet
  34. 32 scrnPort,
  35. 33 alertPort: GrPorts.adsPort;
  36. ***** ^ not supported yet
  37. 34 alertPortRcd: GrPorts.metaPort; (* Allocate the port record *)
  38. ***** ^ not supported yet
  39. 35
  40. 36 PROCEDURE Alert();
  41. 37 VAR
  42. 38 entryPort: GrPorts.adsPort;
  43. ***** ^ not supported yet
  44. 39 BEGIN
  45. 40 Meta.GetPort(entryPort);
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. ***** ^ not supported yet
  49. 41 Meta.SetPort(alertPort);
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. 42 Meta.SetPort(entryPort)
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. 43 END Alert;
  58. ***** ^ not supported yet
  59. 44
  60. 45 BEGIN
  61. 46 (* init the system *)
  62. 47
  63. 48 GrQry.GrInit(GrafixCard, CommPort);
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 49
  68. 50 i := Meta.InitGrafix(-GrafixCard);
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 51
  73. 52 IF (i # 0) THEN
  74. 53 (* Display reason for no go *)
  75. 54 GrQry.GrInitErr(GrafixCard, CommPort, i);
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. 55 END;
  80. 56
  81. 57 Meta.ScreenRect(scrnR);
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. 58 Meta.SetDisplay(GrConst.GrafPg0);
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 59 Meta.EraseRect(scrnR);
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. 60 Meta.GetPort(scrnPort);
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. 61
  99. 62 alertPort := ADR(alertPortRcd);
  100. ***** ^ not supported yet
  101. ***** ^ undeclared identifier
  102. ***** ^ not supported yet
  103. 63 Meta.InitPort(alertPort);
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. 64
  108. 65 Alert();
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. 66
  112. 67 Meta.SetPort(scrnPort);
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. 68
  117. 69 GrQry.GrQuit('', 0);
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. 70 END Sample04.
  122. 50 errors