         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %routinespec local(%integer i)
     2  
     3  %externalroutine fred
 0000                      L1001  EQU $
 0000 C8 00 00 01                           ENTER 0000,1
     4    local(2)
 0004 6A 02                                 PUSH #2
 0006 E8 00 00                              CALL 'LOCAL' (INTERNAL L1000 )
 0009 83 C4 04                              ADD %ESP,#4
     5  %end
 000C C9                                    LEAVE
 000D C3                                    RET
     6  
     7  %routine local(%integer i)
 000E                      L1000  EQU $
 000E C8 00 00 01                           ENTER 0000,1
     8    write(i,0); newline
 0012 FF 75 08                              PUSH DWORD PTR [%EBP+8]
 0015 6A 00                                 PUSH #0
 0017 E8 40 00                              CALL 'WRITE' (EXTERN 64)
 001A 83 C4 08                              ADD %ESP,#8
 001D E8 43 00                              CALL 'NEWLINE' (EXTERN 67)
     9  %end
 0020 C9                                    LEAVE
 0021 C3                                    RET
    10  
    11  %begin
 0022 C8 00 00 01                           ENTER 0000,1
    12    %routinespec jim(%integer i)
    13    jim(22)
 0026 6A 16                                 PUSH #22
 0028 E8 00 00                              CALL 'JIM' (INTERNAL L1003 )
 002B 83 C4 04                              ADD %ESP,#4
    14    %routine jim(%integer i)
 002E EB 00                                 JMP L1004
 0030                      L1003  EQU $
 0030 C8 00 00 02                           ENTER 0000,2
    15      fred
 0034 E8 00 00                              CALL 'FRED' (INTERNAL L1001 )
    16    %end
 0037 C9                                    LEAVE
 0038 C3                                    RET
 0039                      L1004  EQU $
?I unused
    17  %end
    18  
    19  %endoffile
 0039 C9                                    LEAVE
 003A C3                                    RET

    16 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test201.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        7 |        9 |      69 |       0 |     128 |        197 |
 +----------+----------+----------+---------+---------+---------+------------+


