Directives that Initialize Values

Several directives assemble values for the current section. For example:

Figure 5-1 The .field Directivefield1_lau131.gif

NOTE

Directives that Initialize Constants When Used in a .struct/.endstruct Sequence

The .bits, .byte, .char, .word, .int, .long, .ubyte, .uchar, .uhalf, .uint, .ulong, .ushort, .uword, .string, .double, .float, .half, .short, and .field directives do not initialize memory when they are part of a .struct/ .endstruct sequence; rather, they define a member’s size. For more information, see the .struct/.endstruct directives.

Figure 5-2 compares the .byte, .char, .int, .long, .float, .word, and .string directives using the following assembled code:

1 0000 00AA .byte 0AAh,0BBh 0001 00BB 2 0002 00CC .char 0xCC 3 0004 DDDD .word 0xDDDD 4 0006 FFFF .long 0xEEEEFFFF 0008 EEEE 5 000a DDDD .int 0xDDDD 6 000c FCB9 .float 1.9999 000e 3FFF 7 0010 0048 .string "Help" 0011 0065 0012 006C 0013 0070
Figure 5-2 Initialization Directivesinitdirs_lau131.gif