NESHLA: Reference: Preprocessor Keywords:
 Messages

NESHLA gives you the ability to manually set compiler messages, as well as get additional information about the current location in the code.

 Compiler Messages

 #todo ["message"]

The #todo directive allows you to bookmark places in your code with todo messages. The todo messages can be configured to be turned on or off, so they are only displayed in as compiler messages when you want to work with them.

Examples

// an empty bookmark with no message for fast and easy place marking
#todo

// an bookmark with a message
#todo "Finish this code"


 #warning ["message"]

The #warning directive allows you to manually place warning messages in your code. Warning messages are displayed only when enabled, and can be configured with numerous options. They do not stop the compilation, or prevent the compiler from producing output.

This directive, for example, be used within Conditional Define blocks to warn people compiling a code file if certain conditions are not correct.

Examples

// an empty warning with no message for fast and easy place marking
#warning

// an warning with a message
#warning "This is a warning message"


 #error ["message"]

The #error directive allows you to manually place error messages in your code. Error messages are always displayed. They do not stop the compilation, but prevent the compiler from producing output.

This directive, for example, be used within Conditional Define blocks to prevent people compiling a code file if certain conditions are not correct.

Examples

// an empty error with no message for fast and easy place marking
#error

// an error with a message
#error "This is an error message"


 #fatal ["message"]

The #fatal directive allows you to manually place fatal error messages in your code. Fatal error messages are always displayed. They stop the compilation as soon as they are encountered, and prevent the compiler from producing output.

This directive, for example, be used within Conditional Define blocks to prevent people compiling a code file if certain conditions are not correct.

Examples

// an empty fatal error with no message for fast and easy place marking
#fatal

// a fatal error with a message string
#fatal "This is a fatal error message"

 Tell Messages

 #tell.bank

The #tell.bank directive will display a compiler message with the current file name and line number, along with the current bank name and number. It can be used to verify which bank certain code or data is contained in.

Example

#tell.bank

 #tell.bankoffset

The #tell.bankoffset directive will display a compiler message with the current file name and line number, along with the current bank name and number, followed by the current offset within the bank (as opposed to the offset within the ROM or file itself). It can be used to verify the current position of code or data in a bank, as well as for debugging. The bank offset can be used for setting breakpoints in a debugger.

Example

#tell.bankoffset

 #tell.banksize

The #tell.banksize directive will display a compiler message with the current file name and line number, along with the current bank name and number, followed by the current size of the bank. It can be used to see how much of the bank is being used.

Example

#tell.banksize

 #tell.bankfree

The #tell.bankfree directive will display a compiler message with the current file name and line number, along with the current bank name and number, followed by the total number of bytes free in the current bank. It can be used to determine how much space is available for additional code or data in the current bank.

Example

#tell.bankfree

 #tell.banktype

The #tell.banktype directive will display a compiler message with the current file name and line number, along with the current bank name and number, followed by the type of the bank (RAM, PRG ROM, CHR ROM). It can be used to verify where the current code will be built for.

Example

#tell.banktype


<< Back To Index