From Maxim’s World of Stuff

HowToProgram: Directives

Directives are commands to the assembler. That means WLA DX for us. They are used to tell it how to do things, and also what to do, for pretty much all the cases except actual code.

Directives are easy to spot because they all have a dot in front of their names. They are all well documented in the WLA DX documentation.

Here are some of the most useful ones:

Memory layout

Data definition

System-specific helpers

WLA DX supports many CPUs and consoles, and it has helper directives to make sure the resulting file is valid for that system. For the Master System, the main one we use is .sdsctag, which does the following:

Conditional inclusion

If there are parts of your source that you want to sometimes exclude from the result - as in, pretend the code or data was not there in the source at all - you can use the various .if directives. These are similar to #ifdefs in C/C++.

Macros

Macros let you insert things into your source based on parameters or external data. They can be complicated but they are sometimes very useful. I will include some later in the tutorial.

Retrieved from http://www.smspower.org/maxim/HowToProgram/Directives
Page last modified on September 01, 2009, at 09:56 AM