         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %integer main
     3    %string(255) mainfile
     4    %recordformat file fm(%string(255) name, %integer flag)
     5    %record (file fm) %array file(0:1)
 0004 C7 85 E8 FE FF FF 01 00 00 00         MOV DWORD PTR [%EBP-280],#1
 000E C7 85 EC FE FF FF 00 00 00 00         MOV DWORD PTR [%EBP-276],#0
 0018 C7 85 F0 FE FF FF 01 00 00 00         MOV DWORD PTR [%EBP-272],#1
 0022 C7 85 F4 FE FF FF 89 20 00 00         MOV DWORD PTR [%EBP-268],#8329
 002C 8D 85 E8 FE FF FF                     LEA %EAX,[%EBP-280]
 0032 50                                    PUSH %EAX
 0033 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0036 83 C4 04                              ADD %ESP,#4
 0039 8D 8D E8 FE FF FF                     LEA %ECX,[%EBP-280]
 003F 89 E3                                 MOV %EBX,%ESP
 0041 29 D3                                 SUB %EBX,%EDX
 0043 89 9D E0 FE FF FF                     MOV [%EBP-288],%EBX
 0049 89 8D E4 FE FF FF                     MOV [%EBP-284],%ECX
 004F 01 C3                                 ADD %EBX,%EAX
 0051 89 DC                                 MOV %ESP,%EBX
     6    mainfile = "fred.txt"
 0053 8D 85 F8 FE FF FF                     LEA %EAX,[%EBP-264]
 0059 50                                    PUSH %EAX
 005A B9 00 00 00 00                        MOV %ECX,COT+#0
 005F 51                                    PUSH %ECX
 0060 68 FF 00 00 00                        PUSH #255
 0065 E8 03 00                              CALL '_IMPSTRCPY' (EXTERN 3)
 0068 83 C4 0C                              ADD %ESP,#12
     7    main = 1
 006B C7 45 F8 01 00 00 00                  MOV DWORD PTR [%EBP-8],#1
     8    file(main)_name = mainfile
 0072 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0075 FF B5 E4 FE FF FF                     PUSH DWORD PTR [%EBP-284]
 007B E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 007E 83 C4 08                              ADD %ESP,#8
 0081 89 C6                                 MOV %ESI,%EAX
 0083 03 B5 E0 FE FF FF                     ADD %ESI,[%EBP-288]
 0089 56                                    PUSH %ESI
 008A 8D 85 F8 FE FF FF                     LEA %EAX,[%EBP-264]
 0090 50                                    PUSH %EAX
 0091 68 FF 00 00 00                        PUSH #255
 0096 E8 03 00                              CALL '_IMPSTRCPY' (EXTERN 3)
 0099 83 C4 0C                              ADD %ESP,#12
     9    file(main)_flag = 32768
 009C FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 009F FF B5 E4 FE FF FF                     PUSH DWORD PTR [%EBP-284]
 00A5 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00A8 83 C4 08                              ADD %ESP,#8
 00AB 89 C7                                 MOV %EDI,%EAX
 00AD 03 BD E0 FE FF FF                     ADD %EDI,[%EBP-288]
 00B3 C7 87 00 01 00 00 00 80 00 00         MOV DWORD PTR [%EDI+256],#32768
    10  %endofprogram
 00BD C9                                    LEAVE
 00BE C3                                    RET

    10 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test157.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       12 |        5 |        9 |     201 |      10 |      32 |        243 |
 +----------+----------+----------+---------+---------+---------+------------+


