StdIOShell.Mod 9.3 KB

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