         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %integer q,w,e,r,t,y { bump up indexes for easier debugging }
     3    %recordformat testfm(%integer one, two)
     4    %integer u,i,o,p
     5    %record (testfm) %array test(0:10)
 0004 C7 45 C4 01 00 00 00                  MOV DWORD PTR [%EBP-60],#1
 000B C7 45 C8 00 00 00 00                  MOV DWORD PTR [%EBP-56],#0
 0012 C7 45 CC 0A 00 00 00                  MOV DWORD PTR [%EBP-52],#10
 0019 C7 45 D0 09 01 00 00                  MOV DWORD PTR [%EBP-48],#265
 0020 8D 45 C4                              LEA %EAX,[%EBP-60]
 0023 50                                    PUSH %EAX
 0024 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0027 83 C4 04                              ADD %ESP,#4
 002A 8D 4D C4                              LEA %ECX,[%EBP-60]
 002D 89 E3                                 MOV %EBX,%ESP
 002F 29 D3                                 SUB %EBX,%EDX
 0031 89 5D BC                              MOV [%EBP-68],%EBX
 0034 89 4D C0                              MOV [%EBP-64],%ECX
 0037 01 C3                                 ADD %EBX,%EAX
 0039 89 DC                                 MOV %ESP,%EBX
     6    %integer a,s,d,f
     7  
     8    ! BUG TODO should generate struct testfm *pointer()
     9    ! but currently generates struct testfm pointer
    10    %record (testfm) %map pointer
 003B EB 00                                 JMP L1001
 003D                      L1002  EQU $
 003D C8 00 00 02                           ENTER 0000,2
    11      %result == test(q)
 0041 8B 75 FC                              MOV %ESI,[%EBP-4]
 0044 FF 76 F8                              PUSH DWORD PTR [%ESI-8]
 0047 FF 76 C0                              PUSH DWORD PTR [%ESI-64]
 004A 89 75 F4                              MOV [%EBP-12],%ESI
 004D E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0050 83 C4 08                              ADD %ESP,#8
 0053 89 C7                                 MOV %EDI,%EAX
 0055 8B 5D F4                              MOV %EBX,[%EBP-12]
 0058 03 7B BC                              ADD %EDI,[%EBX-68]
 005B 89 F8                                 MOV %EAX,%EDI
 005D C9                                    LEAVE
 005E C3                                    RET
    12    %end
 005F                      L1001  EQU $
    13    %record (testfm) normal
    14    q = 5
 005F C7 45 F8 05 00 00 00                  MOV DWORD PTR [%EBP-8],#5
    15    normal_two = p
 0066 8B 45 D4                              MOV %EAX,[%EBP-44]
 0069 89 45 A8                              MOV [%EBP-88],%EAX
    16    pointer_two = p
 006C E8 00 00                              CALL 'POINTER' (INTERNAL L1002 )
 006F 8B 4D D4                              MOV %ECX,[%EBP-44]
 0072 89 48 04                              MOV [%EAX+4],%ECX
    17  
    18  %endofprogram
 0075 C9                                    LEAVE
 0076 C3                                    RET
