         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2    %on %event 3,4,9 %start
 0004 89 65 F8                              MOV [%EBP-8],%ESP
 0007 EB 00                                 JMP L1001
 0009                      L1002  EQU $
 0009 8B 65 F8                              MOV %ESP,[%EBP-8]
     3      printstring("EM CHAR IN STMNT - DISASTER"); newline
 000C 81 EC 00 01 00 00                     SUB %ESP,#256
 0012 89 E0                                 MOV %EAX,%ESP
 0014 50                                    PUSH %EAX
 0015 B8 00 00 00 00                        MOV %EAX,COT+#0
 001A 50                                    PUSH %EAX
 001B 68 FF 00 00 00                        PUSH #255
 0020 E8 03 00                              CALL '_IMPSTRCPY' (EXTERN 3)
 0023 83 C4 0C                              ADD %ESP,#12
 0026 E8 3B 00                              CALL 'PRINTSTRING' (EXTERN 59)
 0029 81 C4 00 01 00 00                     ADD %ESP,#256
 002F E8 43 00                              CALL 'NEWLINE' (EXTERN 67)
     4      %stop
 0032 B8 04 00 00 00                        MOV %EAX,#4
 0037 50                                    PUSH %EAX
 0038 31 C0                                 XOR %EAX,%EAX
 003A 50                                    PUSH %EAX
 003B 31 C0                                 XOR %EAX,%EAX
 003D 50                                    PUSH %EAX
 003E 31 C0                                 XOR %EAX,%EAX
 0040 50                                    PUSH %EAX
 0041 E8 0B 00                              CALL '_IMPSIGNAL' (EXTERN 11)
 0044 83 C4 10                              ADD %ESP,#16
     5    %finish
 0047                      L1001  EQU $
     6    %integerfn x
 0047 EB 00                                 JMP L1003
 0049                      L1004  EQU $
 0049 C8 00 00 02                           ENTER 0000,2
     7    %integer j,k
     8    %if j=k %then j=j %else %if k=j %then k=k %else %if j=k %then k=j %else %start
 004D 8B 45 F4                              MOV %EAX,[%EBP-12]
 0050 3B 45 F0                              CMP %EAX,[%EBP-16]
 0053 75 00                                 JNE L1005
 0055 EB 00                                 JMP L1006
 0057                      L1005  EQU $
 0057 8B 45 F0                              MOV %EAX,[%EBP-16]
 005A 3B 45 F4                              CMP %EAX,[%EBP-12]
 005D 75 00                                 JNE L1007
 005F EB 00                                 JMP L1006
 0061                      L1007  EQU $
 0061 8B 45 F4                              MOV %EAX,[%EBP-12]
 0064 3B 45 F0                              CMP %EAX,[%EBP-16]
 0067 75 00                                 JNE L1008
 0069 8B 45 F4                              MOV %EAX,[%EBP-12]
 006C 89 45 F0                              MOV [%EBP-16],%EAX
 006F EB 00                                 JMP L1006
 0071                      L1008  EQU $
     9      %begin
 0071 E8 00 00                              CALL '$L1009' (INTERNAL L1009 )
 0074 EB 00                                 JMP L1010
 0076                      L1009  EQU $
 0076 C8 00 00 03                           ENTER 0000,3
    10        k=j
 007A 8B 75 F8                              MOV %ESI,[%EBP-8]
 007D 8B 46 F4                              MOV %EAX,[%ESI-12]
 0080 89 46 F0                              MOV [%ESI-16],%EAX
    11        %return   ;! NOT HANDLED PROPERLY. In some version of Imp77 this is a return from the begin/end block.
 0083 C9                                    LEAVE
 0084 C3                                    RET
    12      %end
 0085                      L1010  EQU $
    13    %finish
    14    %result=1
 0085                      L1006  EQU $
 0085 B8 01 00 00 00                        MOV %EAX,#1
 008A C9                                    LEAVE
 008B C3                                    RET
    15    %end
 008C                      L1003  EQU $
    16    %integer y
    17    %cycle
 008C                      L1011  EQU $
    18      y=x
 008C E8 00 00                              CALL 'X' (INTERNAL L1004 )
 008F 89 45 F4                              MOV [%EBP-12],%EAX
    19    %repeat %until x=y
 0092 E8 00 00                              CALL 'X' (INTERNAL L1004 )
 0095 3B 45 F4                              CMP %EAX,[%EBP-12]
 0098 74 00                                 JE L1012
 009A EB 00                                 JMP L1011
 009C                      L1012  EQU $
    20  %endofprogramm
 009C C9                                    LEAVE
 009D C3                                    RET
    21 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test208.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       12 |        7 |       10 |     172 |      28 |      96 |        296 |
 +----------+----------+----------+---------+---------+---------+------------+


