mcint.mod 580 B

1234567891011121314151617181920212223242526272829
  1. MODULE mcint ;
  2. (* Standalone launcher for the MC64 interpreter.
  3. usage: mcint module.MC4
  4. The first program argument is treated as the module file to boot. *)
  5. FROM Loader2 IMPORT Call ;
  6. FROM ProgramArgs IMPORT ArgChan, NextArg ;
  7. FROM TextIO IMPORT ReadString ;
  8. FROM STextIO IMPORT WriteString, WriteLn ;
  9. VAR
  10. fname : ARRAY [0 .. 511] OF CHAR ;
  11. PROCEDURE Usage ;
  12. BEGIN
  13. WriteString ("usage: mcint module.MC4") ;
  14. WriteLn ;
  15. END Usage ;
  16. BEGIN
  17. NextArg ;
  18. ReadString (ArgChan (), fname) ;
  19. IF fname [0] = 0C THEN
  20. Usage ;
  21. ELSE
  22. Call (fname) ;
  23. END ;
  24. END mcint.