         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %integer i
     3  
     4    %routine dosomething(%integername p)
 0004 EB 00                                 JMP L1001
 0006                      L1002  EQU $
 0006 C8 00 00 02                           ENTER 0000,2
     5      p = p - 1
 000A 8B 75 08                              MOV %ESI,[%EBP+8]
 000D FF 0E                                 DEC DWORD PTR [%ESI]
     6      dosomething(p) %if p>0
 000F 8B 7D 08                              MOV %EDI,[%EBP+8]
 0012 8B 07                                 MOV %EAX,[%EDI]
 0014 3D 00 00 00 00                        CMP %EAX,#0
 0019 7E 00                                 JLE L1003
 001B FF 75 08                              PUSH DWORD PTR [%EBP+8]
 001E E8 00 00                              CALL 'DOSOMETHING' (INTERNAL L1002 )
 0021 83 C4 04                              ADD %ESP,#4
 0024                      L1003  EQU $
     7    %end
 0024 C9                                    LEAVE
 0025 C3                                    RET
 0026                      L1001  EQU $
     8  
     9    i = 10
 0026 C7 45 F8 0A 00 00 00                  MOV DWORD PTR [%EBP-8],#10
    10    dosomething(i)
 002D 8D 45 F8                              LEA %EAX,[%EBP-8]
 0030 50                                    PUSH %EAX
 0031 E8 00 00                              CALL 'DOSOMETHING' (INTERNAL L1002 )
 0034 83 C4 04                              ADD %ESP,#4
    11    
    12  %endofprogram
 0037 C9                                    LEAVE
 0038 C3                                    RET

     9 Statements compiled



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


