         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    %record (rf) %name recn1, recn2
    10    %comment   %record (rf) %name recn1, recn2
    11    %record (rf) %array reca1,reca2(2:3),reca3(4:5,1:2)
 0004 C7 45 CC 01 00 00 00                  MOV DWORD PTR [%EBP-52],#1
 000B C7 45 D0 02 00 00 00                  MOV DWORD PTR [%EBP-48],#2
 0012 C7 45 D4 03 00 00 00                  MOV DWORD PTR [%EBP-44],#3
 0019 C7 45 D8 89 01 00 00                  MOV DWORD PTR [%EBP-40],#393
 0020 8D 45 CC                              LEA %EAX,[%EBP-52]
 0023 50                                    PUSH %EAX
 0024 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0027 83 C4 04                              ADD %ESP,#4
 002A 8D 4D CC                              LEA %ECX,[%EBP-52]
 002D 89 E3                                 MOV %EBX,%ESP
 002F 29 D3                                 SUB %EBX,%EDX
 0031 89 5D C4                              MOV [%EBP-60],%EBX
 0034 89 4D C8                              MOV [%EBP-56],%ECX
 0037 01 C3                                 ADD %EBX,%EAX
 0039 29 D3                                 SUB %EBX,%EDX
 003B 89 5D BC                              MOV [%EBP-68],%EBX
 003E 89 4D C0                              MOV [%EBP-64],%ECX
 0041 01 C3                                 ADD %EBX,%EAX
 0043 89 DC                                 MOV %ESP,%EBX
 0045 C7 45 A4 02 00 00 00                  MOV DWORD PTR [%EBP-92],#2
 004C C7 45 A8 04 00 00 00                  MOV DWORD PTR [%EBP-88],#4
 0053 C7 45 AC 05 00 00 00                  MOV DWORD PTR [%EBP-84],#5
 005A C7 45 B0 01 00 00 00                  MOV DWORD PTR [%EBP-80],#1
 0061 C7 45 B4 02 00 00 00                  MOV DWORD PTR [%EBP-76],#2
 0068 C7 45 B8 89 01 00 00                  MOV DWORD PTR [%EBP-72],#393
 006F 8D 45 A4                              LEA %EAX,[%EBP-92]
 0072 50                                    PUSH %EAX
 0073 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0076 83 C4 04                              ADD %ESP,#4
 0079 8D 4D A4                              LEA %ECX,[%EBP-92]
 007C 89 E3                                 MOV %EBX,%ESP
 007E 29 D3                                 SUB %EBX,%EDX
 0080 89 5D 9C                              MOV [%EBP-100],%EBX
 0083 89 4D A0                              MOV [%EBP-96],%ECX
 0086 01 C3                                 ADD %EBX,%EAX
 0088 89 DC                                 MOV %ESP,%EBX
    12    %comment   %record (rf) %array reca1,reca2(2:3),reca3(4:5,1:2)
    13    %record (rf) %array %name recan1,recan2
    14    %comment   %record (rf) %array %name recan1,recan2
    15    %record (rf) %name %array recna1,recna2(2:3),recna3(1:2)
 008A C7 85 7C FF FF FF 01 00 00 00         MOV DWORD PTR [%EBP-132],#1
 0094 C7 85 80 FF FF FF 02 00 00 00         MOV DWORD PTR [%EBP-128],#2
 009E C7 45 84 03 00 00 00                  MOV DWORD PTR [%EBP-124],#3
 00A5 C7 45 88 89 00 00 00                  MOV DWORD PTR [%EBP-120],#137
 00AC 8D 85 7C FF FF FF                     LEA %EAX,[%EBP-132]
 00B2 50                                    PUSH %EAX
 00B3 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 00B6 83 C4 04                              ADD %ESP,#4
 00B9 8D 8D 7C FF FF FF                     LEA %ECX,[%EBP-132]
 00BF 89 E3                                 MOV %EBX,%ESP
 00C1 29 D3                                 SUB %EBX,%EDX
 00C3 89 9D 74 FF FF FF                     MOV [%EBP-140],%EBX
 00C9 89 8D 78 FF FF FF                     MOV [%EBP-136],%ECX
 00CF 01 C3                                 ADD %EBX,%EAX
 00D1 29 D3                                 SUB %EBX,%EDX
 00D3 89 9D 6C FF FF FF                     MOV [%EBP-148],%EBX
 00D9 89 8D 70 FF FF FF                     MOV [%EBP-144],%ECX
 00DF 01 C3                                 ADD %EBX,%EAX
 00E1 89 DC                                 MOV %ESP,%EBX
 00E3 C7 85 5C FF FF FF 01 00 00 00         MOV DWORD PTR [%EBP-164],#1
 00ED C7 85 60 FF FF FF 01 00 00 00         MOV DWORD PTR [%EBP-160],#1
 00F7 C7 85 64 FF FF FF 02 00 00 00         MOV DWORD PTR [%EBP-156],#2
 0101 C7 85 68 FF FF FF 89 00 00 00         MOV DWORD PTR [%EBP-152],#137
 010B 8D 85 5C FF FF FF                     LEA %EAX,[%EBP-164]
 0111 50                                    PUSH %EAX
 0112 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0115 83 C4 04                              ADD %ESP,#4
 0118 8D 8D 5C FF FF FF                     LEA %ECX,[%EBP-164]
 011E 89 E3                                 MOV %EBX,%ESP
 0120 29 D3                                 SUB %EBX,%EDX
 0122 89 9D 54 FF FF FF                     MOV [%EBP-172],%EBX
 0128 89 8D 58 FF FF FF                     MOV [%EBP-168],%ECX
 012E 01 C3                                 ADD %EBX,%EAX
 0130 89 DC                                 MOV %ESP,%EBX
    16    %comment   %record (rf) %name %array recna1,recna2(2:3),recna3(1:2)
    17    %record (rf) %name %array %name recnan1,recnan2
    18    %comment   %record (rf) %name %array %name recnan1,recnan2
    19    %record(rf)%fn rfn1
 0132 EB 00                                 JMP L1001
 0134                      L1002  EQU $
 0134 C8 00 00 02                           ENTER 0000,2
    20    %comment   %record(rf)%fn rfn1
    21      %result = rec2
 0138 8B 7D 08                              MOV %EDI,[%EBP+8]
 013B B9 0C 00 00 00                        MOV %ECX,#12
 0140 8B 75 FC                              MOV %ESI,[%EBP-4]
 0143 8D 76 E4                              LEA %ESI,[%ESI-28]
 0146 F3 A4                                 REP MOVSB
 0148 C9                                    LEAVE
 0149 C3                                    RET
    22    %comment     %result = rec2
    23    %end
 014A                      L1001  EQU $
    24    %comment   %end
    25    %record(rf)%map rmap1
 014A                      L1003  EQU $
 014A C8 00 00 02                           ENTER 0000,2
    26    %comment   %record(rf)%map rmap1
    27      %result == rec2
 014E 8B 7D FC                              MOV %EDI,[%EBP-4]
 0151 8D 47 E4                              LEA %EAX,[%EDI-28]
 0154 C9                                    LEAVE
 0155 C3                                    RET
    28    %comment     %result == rec2
    29    %end
 0156                      L1001  EQU $
    30    %comment   %end
    31  
    32    %comment 
    33    rec1 = rec2
 0156 8D 7D F0                              LEA %EDI,[%EBP-16]
 0159 B9 0C 00 00 00                        MOV %ECX,#12
 015E 8D 75 E4                              LEA %ESI,[%EBP-28]
 0161 F3 A4                                 REP MOVSB
    34    %comment   rec1 = rec2
    35    recn1 == rec2
 0163 8D 45 E4                              LEA %EAX,[%EBP-28]
 0166 89 45 E0                              MOV [%EBP-32],%EAX
    36    %comment   recn1 == rec2
    37    rec1 = recn1
 0169 8D 7D F0                              LEA %EDI,[%EBP-16]
 016C B9 0C 00 00 00                        MOV %ECX,#12
 0171 8B 75 E0                              MOV %ESI,[%EBP-32]
 0174 F3 A4                                 REP MOVSB
    38    %comment   rec1 = recn1
    39    reca1(2) = rec2
 0176 6A 02                                 PUSH #2
 0178 FF 75 C8                              PUSH DWORD PTR [%EBP-56]
 017B E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 017E 83 C4 08                              ADD %ESP,#8
 0181 89 C3                                 MOV %EBX,%EAX
 0183 03 5D C4                              ADD %EBX,[%EBP-60]
 0186 89 DF                                 MOV %EDI,%EBX
 0188 B9 0C 00 00 00                        MOV %ECX,#12
 018D 8D 75 E4                              LEA %ESI,[%EBP-28]
 0190 F3 A4                                 REP MOVSB
    40    %comment   reca1(2) = rec2
    41    rec1 = reca1(2)
 0192 6A 02                                 PUSH #2
 0194 FF 75 C8                              PUSH DWORD PTR [%EBP-56]
 0197 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 019A 83 C4 08                              ADD %ESP,#8
 019D 89 C6                                 MOV %ESI,%EAX
 019F 03 75 C4                              ADD %ESI,[%EBP-60]
 01A2 8D 7D F0                              LEA %EDI,[%EBP-16]
 01A5 B9 0C 00 00 00                        MOV %ECX,#12
 01AA F3 A4                                 REP MOVSB
    42    %comment   rec1 = reca1(2)
    43    reca3(4,2) = rec2
 01AC 6A 04                                 PUSH #4
 01AE 6A 02                                 PUSH #2
 01B0 FF 75 A0                              PUSH DWORD PTR [%EBP-96]
 01B3 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01B6 83 C4 0C                              ADD %ESP,#12
 01B9 89 C7                                 MOV %EDI,%EAX
 01BB 03 7D 9C                              ADD %EDI,[%EBP-100]
 01BE B9 0C 00 00 00                        MOV %ECX,#12
 01C3 8D 75 E4                              LEA %ESI,[%EBP-28]
 01C6 F3 A4                                 REP MOVSB
    44    %comment   reca3(4,2) = rec2
    45    rec1 = reca3(4,2)
 01C8 6A 04                                 PUSH #4
 01CA 6A 02                                 PUSH #2
 01CC FF 75 A0                              PUSH DWORD PTR [%EBP-96]
 01CF E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01D2 83 C4 0C                              ADD %ESP,#12
 01D5 89 C3                                 MOV %EBX,%EAX
 01D7 03 5D 9C                              ADD %EBX,[%EBP-100]
 01DA 8D 7D F0                              LEA %EDI,[%EBP-16]
 01DD B9 0C 00 00 00                        MOV %ECX,#12
 01E2 89 DE                                 MOV %ESI,%EBX
 01E4 F3 A4                                 REP MOVSB
    46    %comment   rec1 = reca3(4,2)
    47    recnan1 == recna1
 01E6 8B 85 78 FF FF FF                     MOV %EAX,[%EBP-136]
 01EC 89 85 50 FF FF FF                     MOV [%EBP-176],%EAX
 01F2 8B 85 74 FF FF FF                     MOV %EAX,[%EBP-140]
 01F8 89 85 4C FF FF FF                     MOV [%EBP-180],%EAX
    48    %comment   recnan1 == recna1
    49    recnan1(2) == rec1
 01FE 6A 02                                 PUSH #2
 0200 FF B5 50 FF FF FF                     PUSH DWORD PTR [%EBP-176]
 0206 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0209 83 C4 08                              ADD %ESP,#8
 020C 89 C6                                 MOV %ESI,%EAX
 020E 03 B5 4C FF FF FF                     ADD %ESI,[%EBP-180]
 0214 8D 45 F0                              LEA %EAX,[%EBP-16]
 0217 89 06                                 MOV [%ESI],%EAX
    50    %comment   recnan1(2) == rec1
    51    rec1 = recnan1(2)
 0219 6A 02                                 PUSH #2
 021B FF B5 50 FF FF FF                     PUSH DWORD PTR [%EBP-176]
 0221 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0224 83 C4 08                              ADD %ESP,#8
 0227 89 C7                                 MOV %EDI,%EAX
 0229 03 BD 4C FF FF FF                     ADD %EDI,[%EBP-180]
 022F 89 BD 40 FF FF FF                     MOV [%EBP-192],%EDI
 0235 8D 7D F0                              LEA %EDI,[%EBP-16]
 0238 B9 0C 00 00 00                        MOV %ECX,#12
 023D 8B B5 40 FF FF FF                     MOV %ESI,[%EBP-192]
 0243 8B 36                                 MOV %ESI,[%ESI]
 0245 F3 A4                                 REP MOVSB
    52    %comment   rec1 = recnan1(2)
    53    rec1 = rfn1
 0247 8D 85 34 FF FF FF                     LEA %EAX,[%EBP-204]
 024D 50                                    PUSH %EAX
 024E E8 00 00                              CALL 'RFN1' (INTERNAL L1002 )
 0251 8D 7D F0                              LEA %EDI,[%EBP-16]
 0254 B9 0C 00 00 00                        MOV %ECX,#12
 0259 8D B5 34 FF FF FF                     LEA %ESI,[%EBP-204]
 025F F3 A4                                 REP MOVSB
    54    %comment   rec1 = rfn1
    55    rmap1 = rec1
 0261 E8 00 00                              CALL 'RMAP1' (INTERNAL L1003 )
 0264 89 C7                                 MOV %EDI,%EAX
 0266 B9 0C 00 00 00                        MOV %ECX,#12
 026B 8D 75 F0                              LEA %ESI,[%EBP-16]
 026E F3 A4                                 REP MOVSB
    56    %comment   rmap1 = rec1
    57    rec1 = rmap1
 0270 E8 00 00                              CALL 'RMAP1' (INTERNAL L1003 )
 0273 8D 7D F0                              LEA %EDI,[%EBP-16]
 0276 B9 0C 00 00 00                        MOV %ECX,#12
 027B 89 C6                                 MOV %ESI,%EAX
 027D F3 A4                                 REP MOVSB
    58    %comment   rec1 = rmap1
    59    
    60    %comment   
    61    %comment %endofprogram
    62  %endofprogram
 027F C9                                    LEAVE
 0280 C3                                    RET
?RECNAN2 unused
?RECNA3 unused
?RECNA2 unused
?RECAN2 unused
?RECAN1 unused
?RECA2 unused
?RECN2 unused

    28 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test61.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        6 |        8 |     667 |       0 |      96 |        763 |
 +----------+----------+----------+---------+---------+---------+------------+


