Search   
Home  Print View  

 

Programmer's Manual

Branch Content

Define

Syntax:

#define SYMBOL = VALUE

This directive defines a symbol by indicating the expression (VALUE) it represents. The same can also be done with the equ construct for numeric expressions as illustrated in previous examples.

Actually, support for equ was introduced in H1ASM for compatibility with such "traditional" construct. However, the #define directive is conceptually more robust and more powerful in practice since it allows for symbolic strings too.

The previous example could also be written this way:

#define   MSG_TABLE         = 0x800
#define   ERR_MSG_F_NOFOUND = $File not found
#define   ERR_MSG_S_OV      = $Stack overflow

:MSG_TABLE

#data     ERR_MSG_F_NOFOUND
#data     ERR_MSG_S_OV

Homebuilt CPUs WebRing

JavaScript by Qirien Dhaela

Join the ring?

David Brooks, the designer of the Simplex-III homebrew computer, has founded the Homebuilt CPUs Web Ring. To join, drop David a line, mentioning your page's URL. He will then add it to the list.
You will need to copy this code fragment into your page.

Project start date: May 13 of 2009