pTAL Reference Manual (H06.03+)

Contents
HP pTAL Reference Manual523746-005
xix
Examples (continued)
Examples (continued)
Example 9-4. 8-Byte Alignment and 4-Byte Alignment 9-15
Example 9-5. SHARED8 Structures With Different Base Alignments 9-15
Example 9-6. Well-Aligned Structure With Well-Aligned Substructure 9-16
Example 9-7. SHARED8 Structures With SHARED2 Substructures 9-17
Example 9-8. SHARED2 Structures With SHARED8 Substructure 9-17
Example 9-9. SHARED8 Structure With SHARED2 Substructure 9-18
Example 9-10. Combining SHARED2 and SHARED8 Structures 9-18
Example 9-11. AUTO Field Alignment in Structure (Error) 9-19
Example 9-12. FIELDALIGN(SHARED2) and REFALIGNED(2) Directives 9-21
Example 9-13. Byte Offsets (Decimal) of Fields of a SHARED2 Structure 9-22
Example 9-14. Filler Forcing Alignment in a SHARED8 Structure 9-24
Example 9-15. Structure With SHARED2 Field Alignment 9-25
Example 9-16. Structure With SHARED8 Field Alignment 9-25
Example 9-17. Optimized Structure With SHARED8 Field Alignment 9-25
Example 9-18. Structures That Need Filler 9-26
Example 9-19. Structure Field Crossing an Even-Byte Address (Error) 9-26
Example 9-20. Structure That Needs Filler 9-26
Example 9-21. SHARED8 Structure With Misaligned UNSIGNED Fields 9-27
Example 9-22. SHARED8 Structure With Correctly Aligned UNSIGNED Fields 9-27
Example 9-23. REFALIGNED Clause With Structure Pointers 9-28
Example 9-24. REFALIGNED Clause 9-28
Example 9-25. Default Reference Alignment 9-29
Example 9-26. REFALIGNED(2) 9-30
Example 9-27. REFALIGNED(8) 9-31
Example 9-28. VOLATILE Attribute 9-33
Example 9-29. Template Structure Declaration 9-37
Example 9-30. Template Structure With STRUCTALIGN(MAXALIGN) 9-37
Example 9-31. Referral Structure That References a Template Structure 9-39
Example 9-32. Simple Variables Within a Structure 9-40
Example 9-33. Arrays Within a Structure 9-41
Example 9-34. Using a Zero-Length Array to Initialize a Structure 9-42
Example 9-35. Declaring Definition Substructures 9-44
Example 9-36. Declaring a Referral Substructure 9-46
Example 9-37. Filler Byte Declarations 9-47
Example 9-38. Filler Bit Declaration 9-47
Example 9-39. Simple Pointers Within a Structure 9-49
Example 9-40. Assigning Addresses to Pointers in Structures 9-50
Example 9-41. Assigning Addresses to Pointers in Structures 9-51