         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %routine test(%name param)         ;! ia1         ia2
 0004 EB 00                                 JMP L1001
 0006                      L1002  EQU $
 0006 C8 00 00 02                           ENTER 0000,2
     3      write(addr(param),0)  ; newline  ;! 2145833816  2145833816    are these the same because it's the address of the
 000A FF 75 08                              PUSH DWORD PTR [%EBP+8]
 000D 6A 00                                 PUSH #0
 000F E8 40 00                              CALL 'WRITE' (EXTERN 64)
 0012 83 C4 08                              ADD %ESP,#8
 0015 E8 43 00                              CALL 'NEWLINE' (EXTERN 67)
     4                                        !                           %name param rather than the array it points to?
     5      write(sizeof(param),0); newline  ;! 4           4
 0018 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 001B FF 75 08                              PUSH DWORD PTR [%EBP+8]
 001E E8 11 00                              CALL 'SIZEOF' (EXTERN 17)
 0021 83 C4 08                              ADD %ESP,#8
 0024 50                                    PUSH %EAX
 0025 6A 00                                 PUSH #0
 0027 E8 40 00                              CALL 'WRITE' (EXTERN 64)
 002A 83 C4 08                              ADD %ESP,#8
 002D E8 43 00                              CALL 'NEWLINE' (EXTERN 67)
     6      write(typeof(param),0); newline  ;! 1           1
 0030 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 0033 FF 75 08                              PUSH DWORD PTR [%EBP+8]
 0036 E8 10 00                              CALL 'TYPEOF' (EXTERN 16)
 0039 83 C4 08                              ADD %ESP,#8
 003C 50                                    PUSH %EAX
 003D 6A 00                                 PUSH #0
 003F E8 40 00                              CALL 'WRITE' (EXTERN 64)
 0042 83 C4 08                              ADD %ESP,#8
 0045 E8 43 00                              CALL 'NEWLINE' (EXTERN 67)
     7    %end
 0048 C9                                    LEAVE
 0049 C3                                    RET
 004A                      L1001  EQU $
     8  
     9    %integerarray ia1(3:5)
 004A C7 45 EC 01 00 00 00                  MOV DWORD PTR [%EBP-20],#1
 0051 C7 45 F0 03 00 00 00                  MOV DWORD PTR [%EBP-16],#3
 0058 C7 45 F4 05 00 00 00                  MOV DWORD PTR [%EBP-12],#5
 005F C7 45 F8 83 00 00 00                  MOV DWORD PTR [%EBP-8],#131
 0066 8D 45 EC                              LEA %EAX,[%EBP-20]
 0069 50                                    PUSH %EAX
 006A E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 006D 83 C4 04                              ADD %ESP,#4
 0070 8D 4D EC                              LEA %ECX,[%EBP-20]
 0073 89 E3                                 MOV %EBX,%ESP
 0075 29 D3                                 SUB %EBX,%EDX
 0077 89 5D E4                              MOV [%EBP-28],%EBX
 007A 89 4D E8                              MOV [%EBP-24],%ECX
 007D 01 C3                                 ADD %EBX,%EAX
 007F 89 DC                                 MOV %ESP,%EBX
    10    %integerarray ia2(2:4,3:6)
 0081 C7 45 CC 02 00 00 00                  MOV DWORD PTR [%EBP-52],#2
 0088 C7 45 D0 02 00 00 00                  MOV DWORD PTR [%EBP-48],#2
 008F C7 45 D4 04 00 00 00                  MOV DWORD PTR [%EBP-44],#4
 0096 C7 45 D8 03 00 00 00                  MOV DWORD PTR [%EBP-40],#3
 009D C7 45 DC 06 00 00 00                  MOV DWORD PTR [%EBP-36],#6
 00A4 C7 45 E0 83 00 00 00                  MOV DWORD PTR [%EBP-32],#131
 00AB 8D 45 CC                              LEA %EAX,[%EBP-52]
 00AE 50                                    PUSH %EAX
 00AF E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 00B2 83 C4 04                              ADD %ESP,#4
 00B5 8D 4D CC                              LEA %ECX,[%EBP-52]
 00B8 89 E3                                 MOV %EBX,%ESP
 00BA 29 D3                                 SUB %EBX,%EDX
 00BC 89 5D C4                              MOV [%EBP-60],%EBX
 00BF 89 4D C8                              MOV [%EBP-56],%ECX
 00C2 01 C3                                 ADD %EBX,%EAX
 00C4 89 DC                                 MOV %ESP,%EBX
    11  
    12    test(ia1)
 00C6 FF 75 E8                              PUSH DWORD PTR [%EBP-24]
 00C9 FF 75 E4                              PUSH DWORD PTR [%EBP-28]
 00CC E8 00 00                              CALL 'TEST' (INTERNAL L1002 )
 00CF 83 C4 08                              ADD %ESP,#8
    13    test(ia2)
 00D2 FF 75 C8                              PUSH DWORD PTR [%EBP-56]
 00D5 FF 75 C4                              PUSH DWORD PTR [%EBP-60]
 00D8 E8 00 00                              CALL 'TEST' (INTERNAL L1002 )
 00DB 83 C4 08                              ADD %ESP,#8
    14  
    15  %endofprogram
 00DE C9                                    LEAVE
 00DF C3                                    RET

    14 Statements compiled



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


