StdIOShell.Mod 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. NEW(shell, context.in, context.out, context.error, FALSE, ">");
  11. shell.AwaitDeath;
  12. RETURN
  13. END;
  14. IF str = "compile" THEN str := "Compiler.Compile"
  15. ELSIF str="link" THEN str := "StaticLinker.Link"
  16. ELSIF (str="i") OR (str = "interpreter") THEN str := "InterpreterShell.Start"
  17. END;
  18. Commands.Activate(str, context, {Commands.Wait}, res, msg);
  19. IF res # 0 THEN context.error.String(msg) END;
  20. END Execute;
  21. BEGIN
  22. Execute(StdIO.env);
  23. Modules.Shutdown(Modules.PowerDown);
  24. END StdIOShell.
  25. (** LINUX **)
  26. SystemTools.DoCommands
  27. Compiler.Compile -p=Linux32G --traceModule=Trace
  28. Runtime.Mod Trace.Mod Generic.Linux.I386.Glue.Mod Generic.Linux.I386.Unix.Mod Generic.Unix.I386.Machine.Mod Heaps.Mod Generic.Modules.Mod
  29. Generic.Unix.Objects.Mod
  30. Unix.Kernel.Mod KernelLog.Mod Plugins.Mod Streams.Mod
  31. Pipes.Mod Commands.Mod I386.Reals.Mod Generic.Reflection.Mod TrapWriters.Mod CRC.Mod SystemVersion.Mod
  32. Unix.StdIO.Mod Generic.Unix.Traps.Mod Locks.Mod Unix.Clock.Mod Disks.Mod Files.Mod Dates.Mod Strings.Mod
  33. UTF8Strings.Mod FileTrapWriter.Mod Caches.Mod DiskVolumes.Mod OldDiskVolumes.Mod RAMVolumes.Mod
  34. DiskFS.Mod OldDiskFS.Mod OberonFS.Mod FATVolumes.Mod FATFiles.Mod ISO9660Volumes.Mod
  35. ISO9660Files.Mod Unix.UnixFiles.Mod RelativeFileSystem.Mod BitSets.Mod StringPool.Mod DIagnostics.Mod ObjectFile.Mod GenericLinker.Mod GenericLoader.Mod Unix.BootConsole.Mod
  36. Pipes.Mod Shell.Mod StdIOShell.Mod
  37. ~
  38. StaticLinker.Link --fileFormat=Raw --fileName=oberon --extension=.GofU --displacement=08048000H
  39. Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog
  40. Streams Commands StdIO TrapWriters Traps
  41. Files UnixFiles Clock Dates Reals Strings Diagnostics
  42. BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  43. Pipes Shell StdIOShell
  44. ~
  45. FSTools.CloseFiles oberon ~
  46. ~
  47. (** WINDOWS **)
  48. SystemTools.DoCommands
  49. Compiler.Compile -p=Win32G
  50. Runtime.Mod Trace.Mod Generic.Win32.Kernel32.Mod Win32.Machine.Mod Heaps.Mod
  51. Generic.Modules.Mod Win32.Objects.Mod Win32.Kernel.Mod KernelLog.Mod Streams.Mod Commands.Mod
  52. I386.Reals.Mod Reflection.Mod Locks.Mod Win32.Clock.Mod Files.Mod Dates.Mod Strings.Mod
  53. Diagnostics.Mod StringPool.Mod BitSets.Mod ObjectFile.Mod
  54. GenericLinker.Mod GenericLoader.Mod Options.Mod Debugging.Mod
  55. Win32.WinTrace.Mod Win32.WinFS.Mod
  56. Win32.StdIO.Mod Pipes.Mod Shell.Mod StdIOShell.Mod
  57. StaticLinker.Mod
  58. FoxBasic.Mod FoxProgTools.Mod FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod FoxGlobal.Mod
  59. FoxActiveCells.Mod FoxHardware.Mod FoxFormats.Mod FoxPrintout.Mod
  60. FoxParser.Mod FoxCSharpParser.Mod FoxSemanticChecker.Mod
  61. FoxBackend.Mod FoxSections.Mod
  62. FoxFrontend.Mod FoxOberonFrontend.Mod FoxCSharpFrontend.Mod
  63. FoxCompiler.Mod FoxFingerPrinter.Mod FoxInterfaceComparison.Mod FoxTextualSymbolFile.Mod FoxBinarySymbolFile.Mod
  64. FoxBinaryCode.Mod FoxIntermediateCode.Mod FoxIntermediateBackend.Mod FoxCodeGenerators.Mod
  65. FoxBinaryObjectFile.Mod FoxGenericObjectFile.Mod
  66. FoxAMD64InstructionSet.Mod FoxAMD64Assembler.Mod FoxAMDBackend.Mod
  67. FoxAssembler.Mod FoxIntermediateAssembler.Mod FoxDisassembler.Mod
  68. FoxARMInstructionSet.Mod FoxARMAssembler.Mod FoxARMBackend.Mod FoxMinosObjectFile.Mod
  69. FoxIntermediateParser.Mod FoxIntermediateObjectFile.Mod FoxIntermediateLinker.Mod
  70. FoxTRMInstructionSet.Mod FoxTRMAssembler.Mod FoxTRMBackend.Mod
  71. FoxInterpreterBackend.Mod FoxTranspilerBackend.Mod
  72. FoxDocumentationScanner.Mod FoxDocumentationTree.Mod FoxDocumentationPrinter.Mod FoxDocumentationHtml.Mod
  73. FoxDocumentationParser.Mod FoxDocumentationBackend.Mod
  74. FoxProfiler.Mod
  75. ~
  76. (* first lines can be replaced by Kernel.lib *)
  77. StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H
  78. Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files
  79. WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader
  80. WinTrace StdIO Pipes Shell StdIOShell
  81. Options Locks Debugging
  82. StaticLinker
  83. FoxBasic FoxProgTools FoxScanner FoxSyntaxTree FoxGlobal
  84. FoxActiveCells FoxHardware FoxFormats FoxPrintout
  85. FoxParser FoxSemanticChecker
  86. FoxBackend FoxSections
  87. FoxFrontend FoxOberonFrontend
  88. Compiler FoxFingerPrinter FoxInterfaceComparison FoxTextualSymbolFile FoxBinarySymbolFile
  89. FoxBinaryCode FoxIntermediateCode FoxIntermediateBackend FoxCodeGenerators
  90. FoxBinaryObjectFile FoxGenericObjectFile
  91. FoxAMD64InstructionSet FoxAMD64Assembler FoxAMDBackend
  92. FoxAssembler FoxIntermediateAssembler FoxDisassembler
  93. FoxARMInstructionSet FoxARMAssembler FoxARMBackend
  94. FoxMinosObjectFile
  95. FoxIntermediateParser FoxIntermediateObjectFile FoxIntermediateLinker
  96. FoxTRMInstructionSet FoxTRMAssembler FoxTRMBackend
  97. FoxInterpreterBackend FoxTranspilerBackend
  98. FoxDocumentationScanner FoxDocumentationTree FoxDocumentationPrinter FoxDocumentationHtml
  99. FoxDocumentationParser FoxDocumentationBackend
  100. SystemTools
  101. ~
  102. FSTools.CloseFiles oberon.exe ~
  103. ~
  104. FoxGenericObjectFile.MakeLibrary
  105. Kernel.Lib Runtime.GofW Trace.GofW
  106. Kernel32.GofW Machine.GofW Heaps.GofW Modules.GofW Objects.GofW
  107. Kernel.GofW KernelLog.GofW Streams.GofW Commands.GofW Files.GofW
  108. WinFS.GofW Clock.GofW Dates.GofW Reals.GofW Strings.GofW Diagnostics.GofW BitSets.GofW StringPool.GofW ObjectFile.GofW GenericLinker.GofW Reflection.GofW
  109. GenericLoader.GofW
  110. WinTrace.GofW WinApplication.GofW
  111. ~
  112. ~