|
@@ -2,9 +2,14 @@ MODULE StdIOShell; (** AUTHOR "Felix Friedrich"; PURPOSE "Command shell for stan
|
|
|
|
|
|
IMPORT StdIO, Commands, Modules, Trace;
|
|
|
|
|
|
+CONST Verbose = FALSE;
|
|
|
+
|
|
|
PROCEDURE Activate(context: Commands.Context; CONST cmd: ARRAY OF CHAR): BOOLEAN;
|
|
|
VAR msg: ARRAY 256 OF CHAR; res: LONGINT;
|
|
|
BEGIN
|
|
|
+ IF Verbose THEN
|
|
|
+ Trace.String("StdIOShell: Activate Command "); Trace.String(cmd); Trace.Ln;
|
|
|
+ END;
|
|
|
Commands.Activate(cmd, context, {Commands.Wait}, res, msg);
|
|
|
IF res # 0 THEN context.error.String(msg); context.error.Ln; RETURN FALSE END;
|
|
|
RETURN TRUE;
|
|
@@ -44,7 +49,9 @@ TYPE
|
|
|
BEGIN{ACTIVE}
|
|
|
Execute(StdIO.env);
|
|
|
FINALLY
|
|
|
- Trace.String("Closing Shell"); Trace.Ln;
|
|
|
+ IF Verbose THEN
|
|
|
+ Trace.String("StdIOShell: Exit"); Trace.Ln;
|
|
|
+ END;
|
|
|
Modules.Shutdown(Modules.PowerDown);
|
|
|
done := TRUE
|
|
|
END Executor;
|
|
@@ -60,10 +67,19 @@ END StdIOShell.
|
|
|
Linking a command line shell:
|
|
|
|
|
|
Command line shell: (Windows):
|
|
|
-StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader WinTrace StdIO Traps RelativeFileSystem WMDefaultFont SystemTools StdIOShell ~
|
|
|
+StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader WinTrace StdIO Traps RelativeFileSystem WMDefaultFont SystemTools Shell StdIOShell ~
|
|
|
|
|
|
-Command line shell: (Linux):
|
|
|
-StaticLinker.Link -p=Linux32G Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog Streams Commands Pipes StdIO TrapWriters Reflection Traps Files UnixFiles Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker GenericLoader Shell SystemTools StdIOShell ~
|
|
|
+Command line shell including compiler (and linker)
|
|
|
+StaticLinker.Link --fileFormat=PE32CUI --fileName=oberon.exe --extension=GofW --displacement=401000H Runtime Trace Kernel32 Machine Heaps Modules Objects Kernel KernelLog Streams Commands Files WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection GenericLoader WinTrace StdIO Traps RelativeFileSystem WMDefaultFont SystemTools StdIOShell
|
|
|
+Shell StaticLinker Compiler FoxOberonFrontend FoxARMBackend FoxAMDBackend
|
|
|
+~
|
|
|
|
|
|
|
|
|
+Command line shell: (Linux):
|
|
|
+StaticLinker.Link -p=Linux32G Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog Streams Commands Pipes StdIO TrapWriters Reflection Traps Files UnixFiles Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker GenericLoader Shell SystemTools StdIOShell ~
|
|
|
+
|
|
|
+Command line shell including compiler (and linker)
|
|
|
+StaticLinker.Link -p=Linux32G Runtime Trace Glue Unix Machine Heaps Modules Objects Kernel KernelLog Streams Commands Pipes StdIO TrapWriters Reflection Traps Files UnixFiles Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker GenericLoader Shell SystemTools StdIOShell
|
|
|
+StaticLinker Compiler FoxOberonFrontend FoxARMBackend FoxAMDBackend
|
|
|
+~
|
|
|
|