StdIOShell.Mod 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. MODULE StdIOShell; (** AUTHOR ""; PURPOSE ""; *)
  2. IMPORT StdIO, Commands, Streams, Modules, Objects, Shell;
  3. PROCEDURE Activate(context: Commands.Context; CONST cmd: ARRAY OF CHAR): BOOLEAN;
  4. VAR msg: ARRAY 256 OF CHAR; res: LONGINT;
  5. BEGIN
  6. Commands.Activate(cmd, context, {Commands.Wait}, res, msg);
  7. IF res # 0 THEN context.error.String(msg); context.error.Ln; RETURN FALSE END;
  8. RETURN TRUE;
  9. END Activate;
  10. PROCEDURE Execute(context: Commands.Context);
  11. VAR str, msg: ARRAY 256 OF CHAR; res: LONGINT; shell: Shell.Shell; b: BOOLEAN;
  12. BEGIN
  13. IF ~context.arg.GetString(str) THEN
  14. context.out.String("Critical error: no arg");
  15. RETURN
  16. END;
  17. IF ~context.arg.GetString(str) THEN
  18. str := "Shell.Start";
  19. ELSIF str = "compile" THEN str := "Compiler.Compile"
  20. ELSIF str="link" THEN str := "StaticLinker.Link"
  21. ELSIF (str="i") OR (str = "interpreter") THEN str := "InterpreterShell.Start"
  22. ELSIF (str = "execute") OR (str="e") THEN str := "SystemTools.DoFile";
  23. ELSIF (str = "run") OR (str="r") THEN
  24. IF ~Activate(context, "SystemTools.DoFile") THEN RETURN END;
  25. str := "Shell.Start";
  26. END;
  27. b := Activate(context, str);
  28. END Execute;
  29. (* do not add commands here -- the module loader does not finish here and they will not become available *)
  30. BEGIN
  31. Execute(StdIO.env);
  32. Modules.Shutdown(Modules.PowerDown);
  33. LOOP END;
  34. END StdIOShell.
  35. SystemTools.Free StaticLinker ~
  36. SystemTools.DoCommands
  37. StaticLinker.Link -p=Linux32G
  38. Runtime Traps UnixFiles RelativeFileSystem GenericLoader
  39. WMDefaultFont
  40. StdIOShell
  41. Compiler
  42. StaticLinker
  43. FoxOberonFrontend
  44. FoxAMDBackend
  45. FoxARMBackend
  46. FoxGenericObjectFile
  47. InterpreterShell
  48. SystemTools
  49. FSTools
  50. PCAAMD64
  51. BootManager
  52. VirtualDisks
  53. DiskFS
  54. Partitions
  55. ~
  56. FSTools.CloseFiles oberon ~
  57. ~
  58. SystemTools.DoCommands
  59. StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H
  60. Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files
  61. WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  62. WinTrace StdIO
  63. Runtime Traps RelativeFileSystem GenericLoader
  64. WMDefaultFont
  65. StdIOShell
  66. Compiler
  67. StaticLinker
  68. FoxOberonFrontend
  69. FoxAMDBackend
  70. FoxARMBackend
  71. FoxGenericObjectFile
  72. InterpreterShell
  73. SystemTools
  74. FSTools
  75. PCAAMD64
  76. BootManager
  77. VirtualDisks
  78. DiskFS
  79. Partitions
  80. ~
  81. FSTools.CloseFiles oberon.exe ~
  82. ~
  83. (** LINUX **)
  84. SystemTools.DoCommands
  85. Compiler.Compile -p=Linux32G --mergeSections
  86. Runtime.Mod Trace.Mod Generic.Linux.I386.Glue.Mod Generic.Linux.I386.Unix.Mod Generic.Unix.I386.Machine.Mod Heaps.Mod Generic.Modules.Mod
  87. Generic.Unix.Objects.Mod
  88. Unix.Kernel.Mod KernelLog.Mod Plugins.Mod Streams.Mod
  89. Pipes.Mod Commands.Mod I386.Reals.Mod Generic.Reflection.Mod TrapWriters.Mod CRC.Mod SystemVersion.Mod
  90. Unix.StdIO.Mod Generic.Unix.Traps.Mod Locks.Mod Unix.Clock.Mod Disks.Mod Files.Mod Dates.Mod Strings.Mod
  91. UTF8Strings.Mod FileTrapWriter.Mod Caches.Mod DiskVolumes.Mod OldDiskVolumes.Mod RAMVolumes.Mod
  92. DiskFS.Mod OldDiskFS.Mod OberonFS.Mod FATVolumes.Mod FATFiles.Mod ISO9660Volumes.Mod
  93. ISO9660Files.Mod Unix.UnixFiles.Mod RelativeFileSystem.Mod BitSets.Mod StringPool.Mod Diagnostics.Mod
  94. ObjectFile.Mod GenericLinker.Mod GenericLoader.Mod Unix.BootConsole.Mod
  95. Pipes.Mod Shell.Mod StdIOShell.Mod
  96. Options.Mod Debugging.Mod
  97. StaticLinker.Mod
  98. FoxBasic.Mod FoxProgTools.Mod FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod FoxGlobal.Mod
  99. FoxActiveCells.Mod FoxHardware.Mod FoxFormats.Mod FoxPrintout.Mod
  100. FoxParser.Mod FoxCSharpParser.Mod FoxSemanticChecker.Mod
  101. FoxBackend.Mod FoxSections.Mod
  102. FoxFrontend.Mod
  103. FoxCompiler.Mod
  104. FoxOberonFrontend.Mod FoxCSharpFrontend.Mod
  105. FoxFingerPrinter.Mod FoxInterfaceComparison.Mod FoxTextualSymbolFile.Mod FoxBinarySymbolFile.Mod
  106. FoxBinaryCode.Mod FoxIntermediateCode.Mod FoxIntermediateBackend.Mod FoxCodeGenerators.Mod
  107. FoxBinaryObjectFile.Mod FoxGenericObjectFile.Mod
  108. FoxAMD64InstructionSet.Mod FoxAMD64Assembler.Mod FoxAMDBackend.Mod
  109. FoxAssembler.Mod FoxIntermediateAssembler.Mod FoxDisassembler.Mod
  110. FoxARMInstructionSet.Mod FoxARMAssembler.Mod FoxARMBackend.Mod FoxMinosObjectFile.Mod
  111. FoxIntermediateParser.Mod FoxIntermediateObjectFile.Mod FoxIntermediateLinker.Mod
  112. FoxTRMInstructionSet.Mod FoxTRMAssembler.Mod FoxTRMBackend.Mod
  113. FoxInterpreterBackend.Mod FoxTranspilerBackend.Mod
  114. FoxDocumentationScanner.Mod FoxDocumentationTree.Mod FoxDocumentationPrinter.Mod FoxDocumentationHtml.Mod
  115. FoxDocumentationParser.Mod FoxDocumentationBackend.Mod
  116. DynamicStrings.Mod XMLObjects.Mod XML.Mod XMLScanner.Mod UTF8Strings.Mod XMLParser.Mod
  117. PersistentObjects.Mod FoxInterpreterSymbols.Mod FoxInterpreter.Mod
  118. InterpreterShell.Mod
  119. FoxProfiler.Mod
  120. ProcessInfo0.Mod ProcessInfo.Mod Plugins.Mod SystemTools.Mod
  121. ~
  122. StaticLinker.Link -p=Linux32G
  123. Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog
  124. Streams Commands StdIO TrapWriters Traps
  125. Files UnixFiles Clock Dates Reals Strings Diagnostics
  126. BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  127. Pipes Shell StdIOShell
  128. Options Locks Debugging
  129. StaticLinker
  130. FoxBasic FoxProgTools FoxScanner FoxSyntaxTree FoxGlobal
  131. FoxActiveCells FoxHardware FoxFormats FoxPrintout
  132. FoxParser FoxSemanticChecker
  133. FoxBackend FoxSections
  134. FoxFrontend
  135. Compiler FoxOberonFrontend
  136. FoxFingerPrinter FoxInterfaceComparison FoxTextualSymbolFile FoxBinarySymbolFile
  137. FoxBinaryCode FoxIntermediateCode FoxIntermediateBackend FoxCodeGenerators
  138. FoxBinaryObjectFile FoxGenericObjectFile
  139. FoxAMD64InstructionSet FoxAMD64Assembler FoxAMDBackend
  140. FoxAssembler FoxIntermediateAssembler FoxDisassembler
  141. FoxARMInstructionSet FoxARMAssembler FoxARMBackend
  142. FoxMinosObjectFile
  143. FoxIntermediateParser FoxIntermediateObjectFile FoxIntermediateLinker
  144. FoxTRMInstructionSet FoxTRMAssembler FoxTRMBackend
  145. FoxInterpreterBackend FoxTranspilerBackend
  146. FoxDocumentationScanner FoxDocumentationTree FoxDocumentationPrinter FoxDocumentationHtml
  147. FoxDocumentationParser FoxDocumentationBackend
  148. DynamicStrings XMLObjects XML XMLScanner UTF8Strings XMLParser
  149. PersistentObjects FoxInterpreterSymbols FoxInterpreter
  150. InterpreterShell
  151. CRC SystemVersion ProcessInfo0 ProcessInfo Plugins SystemTools
  152. ~
  153. FSTools.CloseFiles oberon
  154. ~
  155. ~
  156. (** WINDOWS **)
  157. SystemTools.DoCommands
  158. Compiler.Compile -p=Win32G
  159. Runtime.Mod Trace.Mod Generic.Win32.Kernel32.Mod Win32.Machine.Mod Heaps.Mod
  160. Generic.Modules.Mod Win32.Objects.Mod Win32.Kernel.Mod KernelLog.Mod Streams.Mod Commands.Mod
  161. I386.Reals.Mod Generic.Reflection.Mod Locks.Mod Win32.Clock.Mod Files.Mod Dates.Mod Strings.Mod
  162. Diagnostics.Mod StringPool.Mod BitSets.Mod ObjectFile.Mod
  163. GenericLinker.Mod GenericLoader.Mod Options.Mod Debugging.Mod
  164. TrapWriters.Mod CRC.Mod SystemVersion.Mod Win32.Traps.Mod
  165. Win32.WinTrace.Mod Win32.WinFS.Mod
  166. Win32.StdIO.Mod Pipes.Mod Shell.Mod StdIOShell.Mod
  167. StaticLinker.Mod
  168. FoxBasic.Mod FoxProgTools.Mod FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod FoxGlobal.Mod
  169. FoxActiveCells.Mod FoxHardware.Mod FoxFormats.Mod FoxPrintout.Mod
  170. FoxParser.Mod FoxCSharpParser.Mod FoxSemanticChecker.Mod
  171. FoxBackend.Mod FoxSections.Mod
  172. FoxFrontend.Mod
  173. FoxCompiler.Mod
  174. FoxOberonFrontend.Mod FoxCSharpFrontend.Mod
  175. FoxFingerPrinter.Mod FoxInterfaceComparison.Mod FoxTextualSymbolFile.Mod FoxBinarySymbolFile.Mod
  176. FoxBinaryCode.Mod FoxIntermediateCode.Mod FoxIntermediateBackend.Mod FoxCodeGenerators.Mod
  177. FoxBinaryObjectFile.Mod FoxGenericObjectFile.Mod
  178. FoxAMD64InstructionSet.Mod FoxAMD64Assembler.Mod FoxAMDBackend.Mod
  179. FoxAssembler.Mod FoxIntermediateAssembler.Mod FoxDisassembler.Mod
  180. FoxARMInstructionSet.Mod FoxARMAssembler.Mod FoxARMBackend.Mod FoxMinosObjectFile.Mod
  181. FoxIntermediateParser.Mod FoxIntermediateObjectFile.Mod FoxIntermediateLinker.Mod
  182. FoxTRMInstructionSet.Mod FoxTRMAssembler.Mod FoxTRMBackend.Mod
  183. FoxInterpreterBackend.Mod FoxTranspilerBackend.Mod
  184. FoxDocumentationScanner.Mod FoxDocumentationTree.Mod FoxDocumentationPrinter.Mod FoxDocumentationHtml.Mod
  185. FoxDocumentationParser.Mod FoxDocumentationBackend.Mod
  186. DynamicStrings.Mod XMLObjects.Mod XML.Mod XMLScanner.Mod UTF8Strings.Mod XMLParser.Mod
  187. PersistentObjects.Mod FoxInterpreterSymbols.Mod FoxInterpreter.Mod
  188. InterpreterShell.Mod
  189. FoxProfiler.Mod
  190. ProcessInfo0.Mod ProcessInfo.Mod Plugins.Mod SystemTools.Mod
  191. ~
  192. (* first lines can be replaced by Kernel.lib *)
  193. StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H
  194. Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files
  195. WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  196. WinTrace StdIO
  197. TrapWriters CRC SystemVersion Traps
  198. Pipes Shell StdIOShell
  199. Options Locks Debugging
  200. StaticLinker
  201. FoxBasic FoxProgTools FoxScanner FoxSyntaxTree FoxGlobal
  202. FoxActiveCells FoxHardware FoxFormats FoxPrintout
  203. FoxParser FoxSemanticChecker
  204. FoxBackend FoxSections
  205. FoxFrontend
  206. Compiler
  207. FoxOberonFrontend
  208. FoxFingerPrinter FoxInterfaceComparison FoxTextualSymbolFile FoxBinarySymbolFile
  209. FoxBinaryCode FoxIntermediateCode FoxIntermediateBackend FoxCodeGenerators
  210. FoxBinaryObjectFile FoxGenericObjectFile
  211. FoxAMD64InstructionSet FoxAMD64Assembler FoxAMDBackend
  212. FoxAssembler FoxIntermediateAssembler FoxDisassembler
  213. FoxARMInstructionSet FoxARMAssembler FoxARMBackend
  214. FoxMinosObjectFile
  215. FoxIntermediateParser FoxIntermediateObjectFile FoxIntermediateLinker
  216. FoxTRMInstructionSet FoxTRMAssembler FoxTRMBackend
  217. FoxInterpreterBackend FoxTranspilerBackend
  218. FoxDocumentationScanner FoxDocumentationTree FoxDocumentationPrinter FoxDocumentationHtml
  219. FoxDocumentationParser FoxDocumentationBackend
  220. XML XMLScanner DynamicStrings UTF8Strings XMLParser XMLObjects
  221. PersistentObjects FoxInterpreterSymbols FoxInterpreter
  222. InterpreterShell
  223. ProcessInfo0 ProcessInfo Plugins SystemTools
  224. ~
  225. FSTools.CloseFiles oberon.exe ~
  226. ~
  227. FoxGenericObjectFile.MakeLibrary
  228. Kernel.Lib Runtime.GofW Trace.GofW
  229. Kernel32.GofW Machine.GofW Heaps.GofW Modules.GofW Objects.GofW
  230. Kernel.GofW KernelLog.GofW Streams.GofW Commands.GofW Files.GofW
  231. WinFS.GofW Clock.GofW Dates.GofW Reals.GofW Strings.GofW Diagnostics.GofW BitSets.GofW StringPool.GofW ObjectFile.GofW GenericLinker.GofW Reflection.GofW
  232. GenericLoader.GofW
  233. WinTrace.GofW WinApplication.GofW
  234. ~
  235. ~