11 Assembler Status
Instances of the assembler status class are used to record the status of an assembly operation. The instance is created by the code that calls the master assembler's Assemble() method.
The TAssembler_Status class contains the following methods:
string Filename()
Returns the name of the current file being assembled.
boolean Get_Aborted()
Returns the current aborted state. Initially it is false but can be set via Set_Aborted.
int64 Get_Code()
Returns the number of bytes of generated Code.
int64 Get_Data()
Returns the number of bytes of generated Data.
integer Get_Errors()
Returns the count of serious and/or fatal errors.
integer Get_Warnings()
Returns the count of warnings.
string Get_Error_Text()
Returns the default error text set via Set_Error_Text.
void Set_Aborted( boolean Value )
Sets the aborted state.
void Set_Code( int64 Value )
Sets the code size, in bytes.
void Set_Data( int64 Value )
Sets the data size, in bytes.
void Set_Errors( integer Value )
Set error count.
void Set_Warnings( integer Value )
Set warning count.
void Set_Error_Text( string Value )
Sets the default error text.
void Get_Error( integer Index, string& Text, string& Filename, integer& Line, integer& Severity )
Retrieves the error information from the error list at the specified index (0 is the first). If the index is invalid the text will be set to NULL.
void Log_Error( string Text, string Filename, integer Line, integer Severity )
Add an error to the error list with the specified text, filename, line number and severity. If Line is -1, the current line is used. The current line is set via Set_Line. Severity is one of the following values:
0 = Informational message
1 = Warning
2 = Non-fatal error
3 = Fatal error
void Set_Line( integer Value )
Sets the current line number.
Void Output_To_Listing( String Text, integer Text_Type )
The assembler sends text to this method while assembling the code. This can be ignored, or used to create a listing output. The text types are:
Value |
Mnuemonic |
Meaning |
0 |
ListOut_Source |
Source |
1 |
ListOut_Generated_Data |
Generated data |
2 |
ListOut_New_Line |
New line |
3 |
ListOut_New_Page |
New page. Has no effect if paging is turned off. |
4 |
ListOut_Title_Text |
Title text |
5 |
ListOut_Paging |
Turn on paging mode. Paging mode defines 66 lines per page, with the top 3 and bottom 3 being margins and headings. Paging is on by default. |
6 |
ListOut_No_Paging |
Turn off paging mode. |
7 |
ListOut_Table |
Symbol table data. |
8 |
ListOut_Message |
Message text generated by source file. |
9 |
ListOut_SubTitle |
Subtitle text. |