StdIOShell.Mod 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. MODULE StdIOShell; (** AUTHOR ""; PURPOSE ""; *)
  2. IMPORT StdIO, Commands, Modules, Streams, Pipes, Strings;
  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: ARRAY 256 OF CHAR; 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. VAR
  31. env: Commands.Context;
  32. str: Strings.String;
  33. decoupler: Pipes.ReadDecoupler;
  34. inDecoupled: Streams.Receiver;
  35. inStreamDecoupled: Streams.Reader;
  36. BEGIN
  37. Execute(StdIO.env);
  38. TRACE('shell died');
  39. Modules.Shutdown(Modules.PowerDown);
  40. LOOP END;
  41. END StdIOShell.
  42. SystemTools.Free StaticLinker ~
  43. SystemTools.DoCommands
  44. StaticLinker.Link -p=Linux32G
  45. Runtime Traps UnixFiles RelativeFileSystem GenericLoader
  46. WMDefaultFont
  47. StdIOShell
  48. Compiler
  49. StaticLinker
  50. FoxOberonFrontend
  51. FoxAMDBackend
  52. FoxARMBackend
  53. FoxGenericObjectFile
  54. InterpreterShell
  55. SystemTools
  56. FSTools
  57. PCAAMD64
  58. BootManager
  59. VirtualDisks
  60. DiskFS
  61. Partitions
  62. ~
  63. FSTools.CloseFiles oberon ~
  64. ~
  65. SystemTools.DoCommands
  66. StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H
  67. Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files
  68. WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  69. WinTrace StdIO
  70. Runtime Traps RelativeFileSystem GenericLoader
  71. WMDefaultFont
  72. StdIOShell
  73. Compiler
  74. StaticLinker
  75. FoxOberonFrontend
  76. FoxAMDBackend
  77. FoxARMBackend
  78. FoxGenericObjectFile
  79. InterpreterShell
  80. SystemTools
  81. FSTools
  82. PCAAMD64
  83. BootManager
  84. VirtualDisks
  85. DiskFS
  86. Partitions
  87. ~
  88. FSTools.CloseFiles oberon.exe ~
  89. ~
  90. (** LINUX **)
  91. SystemTools.DoCommands
  92. Compiler.Compile -p=Linux32G --mergeSections
  93. Runtime.Mod Trace.Mod Generic.Linux.I386.Glue.Mod Generic.Linux.I386.Unix.Mod Generic.Unix.I386.Machine.Mod Heaps.Mod Generic.Modules.Mod
  94. Generic.Unix.Objects.Mod
  95. Unix.Kernel.Mod KernelLog.Mod Plugins.Mod Streams.Mod
  96. Pipes.Mod Commands.Mod I386.Reals.Mod Generic.Reflection.Mod TrapWriters.Mod CRC.Mod SystemVersion.Mod
  97. Unix.StdIO.Mod Generic.Unix.Traps.Mod Locks.Mod Unix.Clock.Mod Disks.Mod Files.Mod Dates.Mod Strings.Mod
  98. UTF8Strings.Mod FileTrapWriter.Mod Caches.Mod DiskVolumes.Mod OldDiskVolumes.Mod RAMVolumes.Mod
  99. DiskFS.Mod OldDiskFS.Mod OberonFS.Mod FATVolumes.Mod FATFiles.Mod ISO9660Volumes.Mod
  100. ISO9660Files.Mod Unix.UnixFiles.Mod RelativeFileSystem.Mod BitSets.Mod StringPool.Mod Diagnostics.Mod
  101. ObjectFile.Mod GenericLinker.Mod GenericLoader.Mod Unix.BootConsole.Mod
  102. Pipes.Mod Shell.Mod StdIOShell.Mod
  103. Options.Mod Debugging.Mod
  104. StaticLinker.Mod
  105. FoxBasic.Mod FoxProgTools.Mod FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod FoxGlobal.Mod
  106. FoxActiveCells.Mod FoxHardware.Mod FoxFormats.Mod FoxPrintout.Mod
  107. FoxParser.Mod FoxCSharpParser.Mod FoxSemanticChecker.Mod
  108. FoxBackend.Mod FoxSections.Mod
  109. FoxFrontend.Mod
  110. FoxCompiler.Mod
  111. FoxOberonFrontend.Mod FoxCSharpFrontend.Mod
  112. FoxFingerPrinter.Mod FoxInterfaceComparison.Mod FoxTextualSymbolFile.Mod FoxBinarySymbolFile.Mod
  113. FoxBinaryCode.Mod FoxIntermediateCode.Mod FoxIntermediateBackend.Mod FoxCodeGenerators.Mod
  114. FoxBinaryObjectFile.Mod FoxGenericObjectFile.Mod
  115. FoxAMD64InstructionSet.Mod FoxAMD64Assembler.Mod FoxAMDBackend.Mod
  116. FoxAssembler.Mod FoxIntermediateAssembler.Mod FoxDisassembler.Mod
  117. FoxARMInstructionSet.Mod FoxARMAssembler.Mod FoxARMBackend.Mod FoxMinosObjectFile.Mod
  118. FoxIntermediateParser.Mod FoxIntermediateObjectFile.Mod FoxIntermediateLinker.Mod
  119. FoxTRMInstructionSet.Mod FoxTRMAssembler.Mod FoxTRMBackend.Mod
  120. FoxInterpreterBackend.Mod FoxTranspilerBackend.Mod
  121. FoxDocumentationScanner.Mod FoxDocumentationTree.Mod FoxDocumentationPrinter.Mod FoxDocumentationHtml.Mod
  122. FoxDocumentationParser.Mod FoxDocumentationBackend.Mod
  123. DynamicStrings.Mod XMLObjects.Mod XML.Mod XMLScanner.Mod UTF8Strings.Mod XMLParser.Mod
  124. PersistentObjects.Mod FoxInterpreterSymbols.Mod FoxInterpreter.Mod
  125. InterpreterShell.Mod
  126. FoxProfiler.Mod
  127. ProcessInfo0.Mod ProcessInfo.Mod Plugins.Mod SystemTools.Mod
  128. ~
  129. StaticLinker.Link -p=Linux32G
  130. Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog
  131. Streams Commands StdIO TrapWriters Traps
  132. Files UnixFiles Clock Dates Reals Strings Diagnostics
  133. BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  134. Pipes Shell StdIOShell
  135. Options Locks Debugging
  136. StaticLinker
  137. FoxBasic FoxProgTools FoxScanner FoxSyntaxTree FoxGlobal
  138. FoxActiveCells FoxHardware FoxFormats FoxFingerPrinter FoxPrintout
  139. FoxParser FoxSemanticChecker
  140. FoxBackend FoxSections
  141. FoxFrontend
  142. Compiler FoxOberonFrontend
  143. FoxInterfaceComparison FoxTextualSymbolFile FoxBinarySymbolFile
  144. FoxBinaryCode FoxIntermediateCode FoxIntermediateBackend FoxCodeGenerators
  145. FoxBinaryObjectFile FoxGenericObjectFile
  146. FoxAMD64InstructionSet FoxAMD64Assembler FoxAMDBackend
  147. FoxAssembler FoxIntermediateAssembler FoxDisassembler
  148. FoxARMInstructionSet FoxARMAssembler FoxARMBackend
  149. FoxMinosObjectFile
  150. FoxIntermediateParser FoxIntermediateObjectFile FoxIntermediateLinker
  151. FoxTRMInstructionSet FoxTRMAssembler FoxTRMBackend
  152. FoxInterpreterBackend FoxTranspilerBackend
  153. FoxDocumentationScanner FoxDocumentationTree FoxDocumentationPrinter FoxDocumentationHtml
  154. FoxDocumentationParser FoxDocumentationBackend
  155. DynamicStrings XMLObjects XML XMLScanner UTF8Strings XMLParser
  156. PersistentObjects FoxInterpreterSymbols FoxInterpreter
  157. InterpreterShell
  158. CRC SystemVersion ProcessInfo0 ProcessInfo Plugins SystemTools
  159. ~
  160. FSTools.CloseFiles oberon
  161. ~
  162. ~
  163. (** WINDOWS **)
  164. SystemTools.DoCommands
  165. Compiler.Compile -p=Win32G
  166. Runtime.Mod Trace.Mod Generic.Win32.Kernel32.Mod Win32.Machine.Mod Heaps.Mod
  167. Generic.Modules.Mod Win32.Objects.Mod Win32.Kernel.Mod KernelLog.Mod Streams.Mod Commands.Mod
  168. I386.Reals.Mod Generic.Reflection.Mod Locks.Mod Win32.Clock.Mod Files.Mod Dates.Mod Strings.Mod
  169. Diagnostics.Mod StringPool.Mod BitSets.Mod ObjectFile.Mod
  170. GenericLinker.Mod GenericLoader.Mod Options.Mod Debugging.Mod
  171. TrapWriters.Mod CRC.Mod SystemVersion.Mod Win32.Traps.Mod
  172. Win32.WinTrace.Mod Win32.WinFS.Mod
  173. Win32.StdIO.Mod Pipes.Mod Shell.Mod StdIOShell.Mod
  174. StaticLinker.Mod
  175. FoxBasic.Mod FoxProgTools.Mod FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod FoxGlobal.Mod
  176. FoxActiveCells.Mod FoxHardware.Mod FoxFormats.Mod FoxPrintout.Mod
  177. FoxParser.Mod FoxCSharpParser.Mod FoxSemanticChecker.Mod
  178. FoxBackend.Mod FoxSections.Mod
  179. FoxFrontend.Mod
  180. FoxCompiler.Mod
  181. FoxOberonFrontend.Mod FoxCSharpFrontend.Mod
  182. FoxFingerPrinter.Mod FoxInterfaceComparison.Mod FoxTextualSymbolFile.Mod FoxBinarySymbolFile.Mod
  183. FoxBinaryCode.Mod FoxIntermediateCode.Mod FoxIntermediateBackend.Mod FoxCodeGenerators.Mod
  184. FoxBinaryObjectFile.Mod FoxGenericObjectFile.Mod
  185. FoxAMD64InstructionSet.Mod FoxAMD64Assembler.Mod FoxAMDBackend.Mod
  186. FoxAssembler.Mod FoxIntermediateAssembler.Mod FoxDisassembler.Mod
  187. FoxARMInstructionSet.Mod FoxARMAssembler.Mod FoxARMBackend.Mod FoxMinosObjectFile.Mod
  188. FoxIntermediateParser.Mod FoxIntermediateObjectFile.Mod FoxIntermediateLinker.Mod
  189. FoxTRMInstructionSet.Mod FoxTRMAssembler.Mod FoxTRMBackend.Mod
  190. FoxInterpreterBackend.Mod FoxTranspilerBackend.Mod
  191. FoxDocumentationScanner.Mod FoxDocumentationTree.Mod FoxDocumentationPrinter.Mod FoxDocumentationHtml.Mod
  192. FoxDocumentationParser.Mod FoxDocumentationBackend.Mod
  193. DynamicStrings.Mod XMLObjects.Mod XML.Mod XMLScanner.Mod UTF8Strings.Mod XMLParser.Mod
  194. PersistentObjects.Mod FoxInterpreterSymbols.Mod FoxInterpreter.Mod
  195. InterpreterShell.Mod
  196. FoxProfiler.Mod
  197. ProcessInfo0.Mod ProcessInfo.Mod Plugins.Mod SystemTools.Mod
  198. ~
  199. (* first lines can be replaced by Kernel.lib *)
  200. StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H
  201. Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files
  202. WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  203. WinTrace StdIO
  204. TrapWriters CRC SystemVersion Traps
  205. Pipes Shell StdIOShell
  206. Options Locks Debugging
  207. StaticLinker
  208. FoxBasic FoxProgTools FoxScanner FoxSyntaxTree FoxGlobal
  209. FoxActiveCells FoxHardware FoxFormats FoxPrintout
  210. FoxParser FoxSemanticChecker
  211. FoxBackend FoxSections
  212. FoxFrontend
  213. Compiler
  214. FoxOberonFrontend
  215. FoxFingerPrinter FoxInterfaceComparison FoxTextualSymbolFile FoxBinarySymbolFile
  216. FoxBinaryCode FoxIntermediateCode FoxIntermediateBackend FoxCodeGenerators
  217. FoxBinaryObjectFile FoxGenericObjectFile
  218. FoxAMD64InstructionSet FoxAMD64Assembler FoxAMDBackend
  219. FoxAssembler FoxIntermediateAssembler FoxDisassembler
  220. FoxARMInstructionSet FoxARMAssembler FoxARMBackend
  221. FoxMinosObjectFile
  222. FoxIntermediateParser FoxIntermediateObjectFile FoxIntermediateLinker
  223. FoxTRMInstructionSet FoxTRMAssembler FoxTRMBackend
  224. FoxInterpreterBackend FoxTranspilerBackend
  225. FoxDocumentationScanner FoxDocumentationTree FoxDocumentationPrinter FoxDocumentationHtml
  226. FoxDocumentationParser FoxDocumentationBackend
  227. XML XMLScanner DynamicStrings UTF8Strings XMLParser XMLObjects
  228. PersistentObjects FoxInterpreterSymbols FoxInterpreter
  229. InterpreterShell
  230. ProcessInfo0 ProcessInfo Plugins SystemTools
  231. ~
  232. FSTools.CloseFiles oberon.exe ~
  233. ~
  234. FoxGenericObjectFile.MakeLibrary
  235. Kernel.Lib Runtime.GofW Trace.GofW
  236. Kernel32.GofW Machine.GofW Heaps.GofW Modules.GofW Objects.GofW
  237. Kernel.GofW KernelLog.GofW Streams.GofW Commands.GofW Files.GofW
  238. WinFS.GofW Clock.GofW Dates.GofW Reals.GofW Strings.GofW Diagnostics.GofW BitSets.GofW StringPool.GofW ObjectFile.GofW GenericLinker.GofW Reflection.GofW
  239. GenericLoader.GofW
  240. WinTrace.GofW WinApplication.GofW
  241. ~
  242. ~
  243. FoxGenericObjectFile.MakeLibrary
  244. Fox.Lib
  245. FoxBasic.GofW FoxProgTools.GofW FoxScanner.GofW FoxCSharpScanner.GofW FoxSyntaxTree.GofW FoxGlobal.GofW
  246. FoxActiveCells.GofW FoxHardware.GofW FoxFormats.GofW FoxPrintout.GofW
  247. FoxParser.GofW FoxCSharpParser.GofW FoxSemanticChecker.GofW
  248. FoxBackend.GofW FoxSections.GofW
  249. FoxFrontend.GofW
  250. Compiler.GofW
  251. FoxOberonFrontend.GofW FoxCSharpFrontend.GofW
  252. FoxFingerPrinter.GofW FoxInterfaceComparison.GofW FoxTextualSymbolFile.GofW FoxBinarySymbolFile.GofW
  253. FoxBinaryCode.GofW FoxIntermediateCode.GofW FoxIntermediateBackend.GofW FoxCodeGenerators.GofW
  254. FoxBinaryObjectFile.GofW FoxGenericObjectFile.GofW
  255. FoxAMD64InstructionSet.GofW FoxAMD64Assembler.GofW FoxAMDBackend.GofW
  256. FoxAssembler.GofW FoxIntermediateAssembler.GofW FoxDisassembler.GofW
  257. FoxARMInstructionSet.GofW FoxARMAssembler.GofW FoxARMBackend.GofW FoxMinosObjectFile.GofW
  258. FoxIntermediateParser.GofW FoxIntermediateObjectFile.GofW FoxIntermediateLinker.GofW
  259. FoxTRMInstructionSet.GofW FoxTRMAssembler.GofW FoxTRMBackend.GofW
  260. FoxInterpreterBackend.GofW FoxTranspilerBackend.GofW
  261. FoxDocumentationScanner.GofW FoxDocumentationTree.GofW FoxDocumentationPrinter.GofW FoxDocumentationHtml.GofW
  262. FoxDocumentationParser.GofW FoxDocumentationBackend.GofW
  263. XML.GofW XMLScanner.GofW DynamicStrings.GofW UTF8Strings.GofW XMLParser.GofW XMLObjects.GofW
  264. PersistentObjects.GofW FoxInterpreterSymbols.GofW FoxInterpreter.GofW
  265. ~
  266. StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H
  267. Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files
  268. WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  269. TrapWriters CRC SystemVersion Traps
  270. WinTrace StdIO Pipes Shell StdIOShell
  271. Options Locks Debugging
  272. StaticLinker
  273. Fox.Lib
  274. InterpreterShell
  275. ProcessInfo0 ProcessInfo Plugins SystemTools
  276. ~
  277. StaticLinker.Link -p=Linux32G
  278. Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog
  279. Streams Commands
  280. Files UnixFiles Clock Dates Reals Strings Diagnostics
  281. BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  282. StdIO TrapWriters Traps
  283. Pipes Shell StdIOShell
  284. Options Locks Debugging
  285. StaticLinker
  286. Fox.Lib
  287. InterpreterShell
  288. CRC SystemVersion ProcessInfo0 ProcessInfo Plugins SystemTools
  289. ~
  290. FSTools.CloseFiles oberon
  291. ~
  292. ~