         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %integer i
     3    i = 42
 0004 C7 45 F8 2A 00 00 00                  MOV DWORD PTR [%EBP-8],#42
     4    %integernamearray iana(1:10)
 000B C7 45 E8 01 00 00 00                  MOV DWORD PTR [%EBP-24],#1
 0012 C7 45 EC 01 00 00 00                  MOV DWORD PTR [%EBP-20],#1
 0019 C7 45 F0 0A 00 00 00                  MOV DWORD PTR [%EBP-16],#10
 0020 C7 45 F4 83 00 00 00                  MOV DWORD PTR [%EBP-12],#131
 0027 8D 45 E8                              LEA %EAX,[%EBP-24]
 002A 50                                    PUSH %EAX
 002B E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 002E 83 C4 04                              ADD %ESP,#4
 0031 8D 4D E8                              LEA %ECX,[%EBP-24]
 0034 89 E3                                 MOV %EBX,%ESP
 0036 29 D3                                 SUB %EBX,%EDX
 0038 89 5D E0                              MOV [%EBP-32],%EBX
 003B 89 4D E4                              MOV [%EBP-28],%ECX
 003E 01 C3                                 ADD %EBX,%EAX
 0040 89 DC                                 MOV %ESP,%EBX
     5    iana(5) == i
 0042 6A 05                                 PUSH #5
 0044 FF 75 E4                              PUSH DWORD PTR [%EBP-28]
 0047 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 004A 83 C4 08                              ADD %ESP,#8
 004D 89 C6                                 MOV %ESI,%EAX
 004F 03 75 E0                              ADD %ESI,[%EBP-32]
 0052 8D 45 F8                              LEA %EAX,[%EBP-8]
 0055 89 06                                 MOV [%ESI],%EAX
     6    %integername in == iana(5)
 0057 6A 05                                 PUSH #5
 0059 FF 75 E4                              PUSH DWORD PTR [%EBP-28]
 005C E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 005F 83 C4 08                              ADD %ESP,#8
 0062 89 C7                                 MOV %EDI,%EAX
 0064 03 7D E0                              ADD %EDI,[%EBP-32]
 0067 8B 3F                                 MOV %EDI,[%EDI]
 0069 89 7D DC                              MOV [%EBP-36],%EDI
     7    %integermap im
 006C EB 00                                 JMP L1001
 006E                      L1002  EQU $
 006E C8 00 00 02                           ENTER 0000,2
     8      %result == in
 0072 8B 5D FC                              MOV %EBX,[%EBP-4]
 0075 8B 43 DC                              MOV %EAX,[%EBX-36]
 0078 C9                                    LEAVE
 0079 C3                                    RET
     9    %end
 007A                      L1001  EQU $
    10    write(im,0);! should be 42  
    11  %endofprogram
 007A E8 00 00                              CALL 'IM' (INTERNAL L1002 )
 007D FF 30                                 PUSH DWORD PTR [%EAX]
 007F 6A 00                                 PUSH #0
 0081 E8 40 00                              CALL 'WRITE' (EXTERN 64)
 0084 83 C4 08                              ADD %ESP,#8
 0087 C9                                    LEAVE
 0088 C3                                    RET

    11 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test35.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        5 |        9 |     147 |       0 |      64 |        211 |
 +----------+----------+----------+---------+---------+---------+------------+


