Brass Core Plugins

endcontiguous/contiguous

Enables contiguous block output over an area of source code.

Remarks

Output data simply has an address and value. This means that if you skip a block of data (for example, via the .org directive) without writing anything in the intervening space the object file will have holes in it.

Some output formats, such as Intel HEX files, accomodate this problem by giving each sequence of data an address field. Other output writers, such as the raw writer plugin, ignore the missing data.

This plugin will automatically add explicit output data to fill the holes. It will use the current empty fill value.

Warning

Try and keep the mixing and matching of contiguous regions with non-contiguous regions to a minimum.

Example

; Empty spaces will be filled with the space character.
.emptyfill " "

; Start at address 00.
.org 00

#contiguous

.org 10
    .db "A" ; Appears at 10.
    
.org 20
    .db "B" ; Appears at 20.

#endcontiguous

.org 30
    .db "C" ; Appears at 21.

/* This example assumes use of the raw    *\
 * output plugin. A and B, being declared *
 * inside contiguous regions, appear      *
 * at their absolute positions within the *
 * output binary file. C, being outside a *
 * contiguous region, is simply appended  *
 * after B as the plugin is not allowed   *
 * to insert the missing data between 21  *
\* and 30.                                */

See Also