         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2  
     3    %routine FRED(%integername Param)
 0004 EB 00                                 JMP L1001
 0006                      L1002  EQU $
 0006 C8 00 00 02                           ENTER 0000,2
     4  !    %integer I
     5  !    Param = 3;    ! *Param = 3;
     6  !    Param == I   ;! Although Imp77 allows this, it should be warned about!  It won't propogate out of the routine.
     7  !                  ! This should generate "Param = &I;"
     8    %end
 000A C9                                    LEAVE
 000B C3                                    RET
 000C                      L1001  EQU $
?PARAM unused
     9  
    10    %integer K = 0
 000C C7 45 F8 00 00 00 00                  MOV DWORD PTR [%EBP-8],#0
    11  
    12    FRED(K)
 0013 8D 45 F8                              LEA %EAX,[%EBP-8]
 0016 50                                    PUSH %EAX
 0017 E8 00 00                              CALL 'FRED' (INTERNAL L1002 )
 001A 83 C4 04                              ADD %ESP,#4
    13    ! This should generate "Fred(&K);" 
    14  
    15  %endofprogram
 001D C9                                    LEAVE
 001E C3                                    RET

     6 Statements compiled



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


