SAMPLE06.LST 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. Listing:
  2. 1 (******************************************************************************)
  3. 2 (* SAMPLE06.MOD *)
  4. 3 (* *)
  5. 4 (* Defining a Custom Display Bitmap *)
  6. 5 (* Taken from SAMPLE06.PAS - Metagraphics Software Corporation (c) 1987-1989 *)
  7. 6 (* *)
  8. 7 (* PSW 11/01/90 08:18pm *)
  9. 8 (******************************************************************************)
  10. 9
  11. 10 MODULE Sample06;
  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 FROM GrPorts IMPORT bitmap, rowTblPtr, adsBMap;
  29. ***** ^ duplicate identifier
  30. 28 FROM Storage IMPORT ALLOCATE, DEALLOCATE, Available;
  31. 29
  32. 30 VAR
  33. 31 GrafixCard,
  34. 32 CommPort,
  35. 33 i: INTEGER;
  36. 34 myBitmap: GrPorts.bitmap;
  37. ***** ^ not supported yet
  38. 35 addrBMap: GrPorts.adsBMap;
  39. ***** ^ not supported yet
  40. 36 rowTbl: rowTblPtr;
  41. 37 GotKey: BOOLEAN;
  42. 38
  43. 39 BEGIN
  44. 40 (* init the system *)
  45. 41
  46. 42 GrQry.GrInit(GrafixCard, CommPort);
  47. ***** ^ not supported yet
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. 43
  51. 44 i := Meta.InitGrafix(-GrafixCard);
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. 45
  56. 46 IF (i # 0) THEN
  57. 47 (* Display reason for no go *)
  58. 48 GrQry.GrInitErr(GrafixCard, CommPort, i);
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. 49 END;
  63. 50
  64. 51
  65. 52 myBitmap.devClass := 24; (* Initialize bitmap data fields *)
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. 53 myBitmap.devType := 0;
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. 54 myBitmap.rowBytes := 90; (*= 720/8*)
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. 55 myBitmap.pixWidth := 720;
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. 56 myBitmap.pixHeight := 348;
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. 57 myBitmap.pixResX := 90;
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. 58 myBitmap.pixResY := 64;
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. 59 myBitmap.pixBits := 1;
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. 60 myBitmap.pixPlanes := 1;
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. 61
  93. 62 IF NOT(Available(384*4)) THEN
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 63 GrQry.GrQuit('Insufficient memory.', 1)
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. 64 END;
  102. 65
  103. 66 ALLOCATE(ADDRESS(rowTbl), 384*4);
  104. ***** ^ not supported yet
  105. ***** ^ undeclared identifier
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. 67
  109. 68 myBitmap.mapTable[0] := rowTbl;
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. 69 rowTbl^.rowTable[0] := ADDRESS(0B0000000H); (* Initialize 1st entry *)
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ undeclared identifier
  119. ***** ^ not supported yet
  120. 70
  121. 71 addrBMap := ADR(myBitmap);
  122. ***** ^ not supported yet
  123. ***** ^ undeclared identifier
  124. ***** ^ not supported yet
  125. 72 Meta.InitRowTable(addrBMap, 4, 0000, 2000H);
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. 73 Meta.PortBitmap(addrBMap); (* Assign bitmap to the current port *)
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. 74 Meta.CursorBitmap(addrBMap); (* Track the cursor on this bitmap. *)
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. 75
  139. 76 REPEAT
  140. 77 GotKey := IO.KeyPressed();
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. 78 UNTIL GotKey;
  145. 79
  146. 80 GrQry.GrQuit('', 0);
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. 81 END Sample06.
  151. 68 errors