INITCOMP.LST 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. Listing:
  2. 1 IMPLEMENTATION MODULE InitCompilerMods;
  3. 2 (*
  4. 3 * REPERTOIRE
  5. 4 * Release 1.6
  6. 5 * By Charles Bradford and Cole Brecheen
  7. 6 * (c) Copyright 1985-1990 PMI
  8. 7 * Portland, Oregon
  9. 8 * All rights reserved
  10. 9 * (503) 236-1788
  11. 10 *
  12. 11 * $Header: D:/logfiles/masters/initcomp.jpv 1.1 03 Dec 1990 22:49:22 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15 IMPORT ErrorManager;
  17. 16 IMPORT LowLevel;
  18. 17 IMPORT Lib;
  19. 18 IMPORT Storage;
  20. 19 IMPORT SYSTEM;
  21. 20 IMPORT VStorage;
  22. 21
  23. 22
  24. 23 (*
  25. 24 IMPORT StrEdit;
  26. 25 IMPORT KbdInput;
  27. 26 IMPORT IO;
  28. 27 IMPORT ProcTrace;
  29. 28 IMPORT SmartScreen;
  30. 29 IMPORT M2Strings;
  31. 30 *)
  32. 31
  33. 32 VAR
  34. 33 FormerTermProc: PROC;
  35. ***** ^ undeclared identifier
  36. 34
  37. 35 PROCEDURE NewTermProc;
  38. 36 BEGIN
  39. 37 ErrorManager.DoTermProcs();
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 38 FormerTermProc();
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. 39 END NewTermProc;
  47. ***** ^ not supported yet
  48. 40
  49. 41
  50. 42 PROCEDURE DiagAvail( TheSize: CARDINAL ): BOOLEAN;
  51. 43 BEGIN
  52. 44 RETURN (Storage.Available(TheSize));
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 45 END DiagAvail;
  57. ***** ^ not supported yet
  58. 46
  59. 47 PROCEDURE DiagAlloc( VAR ThePtr: SYSTEM.ADDRESS; TheSize: CARDINAL );
  60. ***** ^ not supported yet
  61. 48 BEGIN
  62. 49 Storage.ALLOCATE( ThePtr, TheSize );
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 50 LowLevel.Fill( ThePtr, TheSize, 377C );
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 51 END DiagAlloc;
  73. ***** ^ not supported yet
  74. 52
  75. 53
  76. 54 PROCEDURE DiagDealloc( VAR ThePtr: SYSTEM.ADDRESS; TheSize: CARDINAL );
  77. ***** ^ not supported yet
  78. 55 BEGIN
  79. 56 LowLevel.Fill( ThePtr, TheSize, 377C );
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. 57 Storage.DEALLOCATE( ThePtr, TheSize );
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. 58 END DiagDealloc;
  90. ***** ^ not supported yet
  91. 59
  92. 60
  93. 61 PROCEDURE AssignProcs();
  94. 62 BEGIN
  95. 63 (* VStorage.DosAvail := DiagAvail;
  96. 64 VStorage.DosAlloc := DiagAlloc;
  97. 65 VStorage.DosDealloc := DiagDealloc; *)
  98. 66 Lib.Terminate( NewTermProc, FormerTermProc );
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. 67 IF NewTermProc = FormerTermProc THEN
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. 68 ErrorManager.WARN(
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. 69 "InitJPI.AssignProcs executed twice; will cause inf loop on exit.");
  110. ***** ^ not supported yet
  111. 70 END;
  112. 71 END AssignProcs;
  113. ***** ^ not supported yet
  114. 72
  115. 73
  116. 74 (*
  117. 75 PROCEDURE AddToCallChain();
  118. 76 BEGIN
  119. 77 INC( CallRow );
  120. 78 SmartScreen.WriteAt( 1, CallRow, ProcTrace.Get_Name() );
  121. 79 END AddToCallChain;
  122. 80
  123. 81
  124. 82 PROCEDURE RemoveFromCallChain();
  125. 83 VAR
  126. 84 TmpStr: ARRAY [0..31] OF CHAR;
  127. 85 BEGIN
  128. 86 StrEdit.AssignStr( ProcTrace.Get_Name(), TmpStr );
  129. 87 SmartScreen.ClearPart( 1, CallRow, M2Strings.Length(TmpStr), CallRow );
  130. 88 DEC( CallRow );
  131. 89 END RemoveFromCallChain;
  132. 90
  133. 91
  134. 92 PROCEDURE ErrorBox( TheMessage: ARRAY OF CHAR ): BOOLEAN;
  135. 93 VAR
  136. 94 dumkey: CARDINAL;
  137. 95 dummy: ARRAY [0..255] OF CHAR;
  138. 96 BEGIN
  139. 97 StrEdit.AssignStr( TheMessage, dummy );
  140. 98 StrEdit.Append( dummy, '. Press C to continue, anything else to abort.' );
  141. 99 IO.WrStr( dummy );
  142. 100 dumkey := KbdInput.KeyHit( KbdInput.AnyKeyNum );
  143. 101 RETURN KbdInput.CAPkey( dumkey ) # ORD('C');
  144. 102 END ErrorBox;
  145. 103 *)
  146. 104
  147. 105
  148. 106 BEGIN
  149. 107 AssignProcs();
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. 108 (*
  153. 109 ErrorManager.AbortConfirmed := ErrorBox;
  154. 110 CallRow := 0;
  155. 111 ProcTrace.Install;
  156. 112 ProcTrace.Entry := AddToCallChain;
  157. 113 ProcTrace.Exit := RemoveFromCallChain;
  158. 114 *)
  159. 115 END InitCompilerMods.
  160. ***** ^ not supported yet
  161. 44 errors