<< Contents << Other Topics << Symbol Tables
 
BitMask Symbol Table Files
 
A bit-mask file is a special type of text symbol table. Symbol names are associated with bit-masks. The bit-masks matches multiple values to each symbol name.
 
Formatting rules
 
* To create a bit-mask file, use the following header lines at the start of the text file...
 
Bitmasks
 
If "Bitmasks=yes", then each symbolic value is a bit-mask instead of a plain value.
 
MaskWidth
 
"MaskWidth=(number)" defines the total bits in each bit-mask.
 
Overwrite
 
If "Overwrite=yes", then duplicate values overwrite the prior symbol strings. If Overwrite=no or is missing, the duplicate values are ignored.
 
* Use a ";" character (semi-colon) at the line start to comment-out the line.
 
* At least one space or tab character must separate each symbol name and the bit-mask.
 
* The bit-masks must use "0", "1", and "x" characters. The "x" character means that the associated bit matches both 0 and 1 values. No spaces can appear in the bit-mask.
 
* The number of bits in each mask must match the "MaskWidth=X" header line.
 
* The lines can use bitmask-first or symbol-first order.
 
* The first line in the file determines the format. Value-first lines cannot be mixed with symbol-first lines.
 
* All lines use the same order. Value-first order cannot be mixed with symbol-first order.
 
* No extra text is allowed in the file.
 
* The file size is unlimited.
 
An optional Color Attribute can be added to each line.
 
Examples
 
BitMasks=yes
MaskWidth=12
OverWrite=yes
HelloWorld    11110000xxxx
 
The symbol name "HelloWorld" matches all values 0xF00 to 0xF0F.
 
Here is an example using a 16-bit bit-mask...
 
BitMasks=yes
MaskWidth=12
OverWrite=yes
Nine       1001xxxxxxxxxxxx
Eight      1000xxxxxxxxxxxx
Seven     0111xxxxxxxxxxxx
Six          0110xxxxxxxxxxxx
 
In both examples above, there are no conflicts between bit-masks. Here is an example of using the "OverWrite=yes" header line.....
 
BitMasks=yes
MaskWidth=12
OverWrite=yes
GENERIC     1111xxxxxxxx
OPCODE1    111100100000
 
The "GENERIC" symbol covers all values 0xF00 to 0xFFF. The "OPCODE1" line overwrites the symbol for 0xF20 because it occurs later in the file and the "OverWrite=yes" header line was used.
 
Copyright and trademark information