         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %comment %begin
     3    %recordformat rf ( %integer i, %real r, %integer i2)
     4    %comment   %recordformat rf ( %integer i, %real r, %integer i2)
     5  
     6    %comment 
     7    %record (rf) rec1, rec2
     8    %comment   %record (rf) rec1, rec2
     9  
    10    %own %record (rf) %name %array recna1(2:3) ;! cannot be initialised
    11    %comment   %own %record (rf) %name %array recna1(2:3)
    12  
    13    %record (rf) %name %array %name recnan1
    14    %comment   %record (rf) %name %array %name recnan1
    15  
    16    %comment 
    17  
    18    ! SETUP
    19    
    20    rec1 = rec2
 0004 8D 7D F0                              LEA %EDI,[%EBP-16]
 0007 B9 0C 00 00 00                        MOV %ECX,#12
 000C 8D 75 E4                              LEA %ESI,[%EBP-28]
 000F F3 A4                                 REP MOVSB
    21    %comment   rec1 = rec2
    22  
    23    recnan1 == recna1
 0011 B8 00 00 00 00                        MOV %EAX,COT+#0
 0016 89 45 E0                              MOV [%EBP-32],%EAX
 0019 B8 F8 FF FF FF                        MOV %EAX,DATA+#-8
 001E 89 45 DC                              MOV [%EBP-36],%EAX
    24    %comment   recnan1 == recna1
    25  
    26    ! TEST
    27    
    28    recnan1(2) == rec1
 0021 6A 02                                 PUSH #2
 0023 FF 75 E0                              PUSH DWORD PTR [%EBP-32]
 0026 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0029 83 C4 08                              ADD %ESP,#8
 002C 89 C6                                 MOV %ESI,%EAX
 002E 03 75 DC                              ADD %ESI,[%EBP-36]
 0031 8D 45 F0                              LEA %EAX,[%EBP-16]
 0034 89 06                                 MOV [%ESI],%EAX
    29    %comment   recnan1(2) == rec1   ... the (2) is missing
    30  
    31    rec2 = recnan1(2)
 0036 6A 02                                 PUSH #2
 0038 FF 75 E0                              PUSH DWORD PTR [%EBP-32]
 003B E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 003E 83 C4 08                              ADD %ESP,#8
 0041 89 C7                                 MOV %EDI,%EAX
 0043 03 7D DC                              ADD %EDI,[%EBP-36]
 0046 89 7D D8                              MOV [%EBP-40],%EDI
 0049 8D 7D E4                              LEA %EDI,[%EBP-28]
 004C B9 0C 00 00 00                        MOV %ECX,#12
 0051 8B 75 D8                              MOV %ESI,[%EBP-40]
 0054 8B 36                                 MOV %ESI,[%ESI]
 0056 F3 A4                                 REP MOVSB
    32    %comment   rec2 = recnan1(2)   ... the (2) is missing
    33  
    34    %comment   
    35    %comment %endofprogram
    36  %endofprogram
 0058 C9                                    LEAVE
 0059 C3                                    RET

    10 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test63.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       13 |        6 |        7 |      94 |      24 |      32 |        150 |
 +----------+----------+----------+---------+---------+---------+------------+


