Download Compilation Systems Volume 1 (Tools)

Transcript
Compilation Systems Volume 1 (Tools)
section mysect,"a",@progbits
/* specify ’mysect’ as
SHF_ALLOC and SHT_PROGBITS */
previous
This directive exchanges the current section and the previous section.
At any point in the assembly, both a current section and a previous section are in
effect. Initially, the current section is text and the previous section is undefined. A
text, data, or section operation causes the current section to become the
previous section and the operation-specified section to become the current section.
Data Initialization
2
{byte | .byte} value[,value]...
The specified value(s) are assembled into consecutive 1-byte locations. Each value
is of manifest type and is in the range -(27) to 28-1. For example,
byte 21, -43
ubyte expression[,expression]...
The specified expression(s) are assembled into consecutive 1-byte locations. Each
expression is of absolute or relocatable type or is an undefined external. Each
expression is in the range 0 to 28-1. For example,
ubyte 55, 0
sbyte expression[,expression]...
The specified expression(s) are assembled into consecutive 1-byte locations. Each
expression is of absolute or relocatable type or is an undefined external. Each
expression is in the range -(27) to 27-1. For example,
sbyte -63,34
{vbyte | .vbyte} number, expression
The specified expression is assembled into consecutive number-byte locations.
expression is of manifest or absolute type. number is in the range 1-4, inclusive. If
expression requires more than number bytes, the left-most bytes are not assembled.
For example,
.vbyte 3,726
{half | .word | short | .short} value[,value]...
The assembler requires that the location counter be evenly divisible by 2 when this
directive is used. The specified value(s) are assembled into consecutive 2-byte
locations. Each value is of manifest type and is in the range -(2 15 ) to 2 16-1. For
example,
2-14