diff --git a/ifpsasm/Program.cs b/ifpsasm/Program.cs index 4d965a9..05c8e6a 100644 --- a/ifpsasm/Program.cs +++ b/ifpsasm/Program.cs @@ -11,11 +11,20 @@ namespace ifpsasm { static void Main(string[] args) { + if (args.Length == 0) + { + Console.WriteLine("Usage: {0} ", Path.GetFileName(System.Reflection.Assembly.GetEntryAssembly().Location)); + Console.WriteLine(); + Console.WriteLine("RemObjects PascalScript assembler."); + Console.WriteLine("Writes the output to the *.bin file in the same directory as the passed in assembly file."); + return; + } var arg = args[0]; var ext = Path.GetExtension(arg); var bin = arg.Substring(0, arg.Length - ext.Length) + ".bin"; var script = IFPSAsmLib.Assembler.Assemble(File.ReadAllText(args[0])); script.Save(File.OpenWrite(bin)); + Console.WriteLine("Assembled script to {0}", bin); } } }