         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %recordformat rf(%integer a,b, %real r)
     3    %record(rf)%array ra(0:9)
 0004 C7 45 EC 01 00 00 00                  MOV DWORD PTR [%EBP-20],#1
 000B C7 45 F0 00 00 00 00                  MOV DWORD PTR [%EBP-16],#0
 0012 C7 45 F4 09 00 00 00                  MOV DWORD PTR [%EBP-12],#9
 0019 C7 45 F8 89 01 00 00                  MOV DWORD PTR [%EBP-8],#393
 0020 8D 45 EC                              LEA %EAX,[%EBP-20]
 0023 50                                    PUSH %EAX
 0024 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0027 83 C4 04                              ADD %ESP,#4
 002A 8D 4D EC                              LEA %ECX,[%EBP-20]
 002D 89 E3                                 MOV %EBX,%ESP
 002F 29 D3                                 SUB %EBX,%EDX
 0031 89 5D E4                              MOV [%EBP-28],%EBX
 0034 89 4D E8                              MOV [%EBP-24],%ECX
 0037 01 C3                                 ADD %EBX,%EAX
 0039 89 DC                                 MOV %ESP,%EBX
     4    %record(rf)%namearray rna(0:9)
 003B C7 45 D4 01 00 00 00                  MOV DWORD PTR [%EBP-44],#1
 0042 C7 45 D8 00 00 00 00                  MOV DWORD PTR [%EBP-40],#0
 0049 C7 45 DC 09 00 00 00                  MOV DWORD PTR [%EBP-36],#9
 0050 C7 45 E0 89 00 00 00                  MOV DWORD PTR [%EBP-32],#137
 0057 8D 45 D4                              LEA %EAX,[%EBP-44]
 005A 50                                    PUSH %EAX
 005B E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 005E 83 C4 04                              ADD %ESP,#4
 0061 8D 4D D4                              LEA %ECX,[%EBP-44]
 0064 89 E3                                 MOV %EBX,%ESP
 0066 29 D3                                 SUB %EBX,%EDX
 0068 89 5D CC                              MOV [%EBP-52],%EBX
 006B 89 4D D0                              MOV [%EBP-48],%ECX
 006E 01 C3                                 ADD %EBX,%EAX
 0070 89 DC                                 MOV %ESP,%EBX
     5    %integer x
     6    x = ra(1)_a
 0072 6A 01                                 PUSH #1
 0074 FF 75 E8                              PUSH DWORD PTR [%EBP-24]
 0077 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 007A 83 C4 08                              ADD %ESP,#8
 007D 89 C6                                 MOV %ESI,%EAX
 007F 03 75 E4                              ADD %ESI,[%EBP-28]
 0082 8B 36                                 MOV %ESI,[%ESI]
 0084 89 75 C8                              MOV [%EBP-56],%ESI
     7    ra(2)_b = x    ;! should use "->" in C
 0087 6A 02                                 PUSH #2
 0089 FF 75 E8                              PUSH DWORD PTR [%EBP-24]
 008C E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 008F 83 C4 08                              ADD %ESP,#8
 0092 89 C7                                 MOV %EDI,%EAX
 0094 03 7D E4                              ADD %EDI,[%EBP-28]
 0097 8B 45 C8                              MOV %EAX,[%EBP-56]
 009A 89 47 04                              MOV [%EDI+4],%EAX
     8    x = rna(1)_a   ;! should use "." in C
 009D 6A 01                                 PUSH #1
 009F FF 75 D0                              PUSH DWORD PTR [%EBP-48]
 00A2 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00A5 83 C4 08                              ADD %ESP,#8
 00A8 89 C3                                 MOV %EBX,%EAX
 00AA 03 5D CC                              ADD %EBX,[%EBP-52]
 00AD 8B 1B                                 MOV %EBX,[%EBX]
 00AF 8B 1B                                 MOV %EBX,[%EBX]
 00B1 89 5D C8                              MOV [%EBP-56],%EBX
     9    rna(2)_b = x
 00B4 6A 02                                 PUSH #2
 00B6 FF 75 D0                              PUSH DWORD PTR [%EBP-48]
 00B9 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00BC 83 C4 08                              ADD %ESP,#8
 00BF 89 C6                                 MOV %ESI,%EAX
 00C1 03 75 CC                              ADD %ESI,[%EBP-52]
 00C4 8B 36                                 MOV %ESI,[%ESI]
 00C6 8B 45 C8                              MOV %EAX,[%EBP-56]
 00C9 89 46 04                              MOV [%ESI+4],%EAX
    10  %endofprogram
 00CC C9                                    LEAVE
 00CD C3                                    RET

    10 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test56.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        4 |        8 |     218 |       0 |      32 |        250 |
 +----------+----------+----------+---------+---------+---------+------------+


