15.5. The IEngine Inteface

The IEngine interface is used to do additional communication to Kick Assembler. It has the following methods:

Table 15.2. IEngine Interface

Method Description
File getFile(String filename); Opens a file with the given filename. The assembler will look for the file as it would look for a soucecode file. If it isn’t present in the current directory, it will look in the library directories. It will return null if the file can’t be found.
File getCurrentDirectory(); Gets the current directory.
void print(String message); Prints a message to the screen. Works like the .print directive.
void printNow(String message); Prints a message to the screen. Works like the .printnow directive.
void error(String message); Prints an error message and stops execution. Works like the .error directive. Important! This method will throw an AsmException which you have to pass through any try-catch block used in your code.