| 1234567891011121314151617181920212223242526272829 |
- MODULE mcint ;
- (* Standalone launcher for the MC64 interpreter.
- usage: mcint module.MC4
- The first program argument is treated as the module file to boot. *)
- FROM Loader2 IMPORT Call ;
- FROM ProgramArgs IMPORT ArgChan, NextArg ;
- FROM TextIO IMPORT ReadString ;
- FROM STextIO IMPORT WriteString, WriteLn ;
- VAR
- fname : ARRAY [0 .. 511] OF CHAR ;
- PROCEDURE Usage ;
- BEGIN
- WriteString ("usage: mcint module.MC4") ;
- WriteLn ;
- END Usage ;
- BEGIN
- NextArg ;
- ReadString (ArgChan (), fname) ;
- IF fname [0] = 0C THEN
- Usage ;
- ELSE
- Call (fname) ;
- END ;
- END mcint.
|