1* .struct 2* .union 3* .tag 4REAL_REC .struct ; stag = REAL_REC 5NUM .int ; NUM = 0 6DEN .int ; DEN = 1 7REAL_LEN .endstruct ; REAL_LEN = 2 8 9 add REAL + REAL_REC.DEN, a ; 000000 0001 10 .bss REAL, REAL_LEN ; 000000 0000 (len = 2) 11 12CPLX_REC .struct 13REALI .tag REAL_REC 14IMAGI .tag REAL_REC 15CPLX_LEN .endstruct 16 ; apply the CPLX_REC structure format to .bss var COMPLEX 17 18 .bss COMPLEX, CPLX_LEN ; 000002 0000 (len = 4) 19COMPLEX .tag CPLX_REC 20 add COMPLEX.REALI, a ; 000001 0002 21 stl a, COMPLEX.REALI ; 000002 8002 22 add COMPLEX.IMAGI, b ; 000003 0104 23 24 ; anonymous struct; symbols become global 25 .struct 26X .int 27Y .int 28Z .int 29 .endstruct 30 31BIT_REC .struct 32STREAM .string 64 ; 33BIT7 .field 7 ; bit7 = 64 34BIT9 .field 9 ; bit9 = 64 35BIT10 .field 10 ; bit10 = 65 36X_INT .int ; x_int = 66 37BIT_LEN .endstruct ; bit_len = 67 38 39 .bss BITS, BIT_LEN ; 000006 0000 (len = 67) 40BITS .tag BIT_REC 41 add BITS.BIT7,a ; 000004 0046 42 and #007Fh, a ; 000005 f030 43 ; 000006 007f 44 .end 45