Program Structure
Macro Processing
value,
No sign extension is provided by the macro assembler when bit fields are generated.
The following macro definition defines the macro PACK with four formal parameters.
PACK .MACROBASE,GREG,SREG,OFFSET {0..5}=0x3E{26..31} {6..10}=BASE{27..31} {11..15}=GREG{27..31} {16..17}=SREG{30..31} {18..31}=OFFSET{18..31}
.ENDM
The following explanation assumes that PACK is invoked with the statement:
PACK
Bit Field | Description |
{0..5} | Contains the six |
| or binary 111110, entered as a constant in the macro |
| definition. |
{6..10} | Contains general register 30, or binary 11110. These |
| are the five |
| macro definition. |
{11..15} | Contains general register 19, or binary 10011. These |
| are the five |
| macro definition. |
{16..17} | Contains space register 0 and represents the five |
| |
| definition. |
{18..31} | Contains binary 11111111001100, the OFFSET value |
| −52, which was entered as an argument to the macro |
definition.
38 | Chapter 2 |