Directives that Initialize Values

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

Figure 5-1 The .field Directivefield1_pnu118.gif

NOTE

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

The .bits, .byte, .char, .int, .long, .word, .double, .half, .short, .ubyte, .uchar, .uhalf, .uint, .ulong, .ushort, .uword, .string, .float, 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, .short, .int, .long, .float, .double, .word, and .string directives using the following assembled code:

1 00000000 AA .byte 0AAh, 0BBh 00000001 BB 2 00000002 CC .char 0CCh 3 00000004 ABCD .short 0ABCDh 4 00000006 0000DDDD .word 0DDDDh 5 0000000a EEEEFFFF .long 0EEEEFFFFh 6 0000000e 0000DDDD .int 0DDDDh 7 00000012 3FFFFCB9 .float 1.9999 8 00000016 3FFFFFF5 .double 1.99999 0000001a 83A53B8E 9 0000001e 48 .string "Help" 0000001f 65 00000020 6C 00000021 70
Figure 5-2 Initialization Directivesinitdirs_arm_lau131.gif