         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %BEGIN
 0000 C8 00 00 01                           ENTER 0000,1
     2    %INTEGER NP
     3    NP = 5
 0004 C7 45 F8 05 00 00 00                  MOV DWORD PTR [%EBP-8],#5
     4    ! Generates wrong C code!  Limit should be evaluated once at start of loop.y
     5    %CYCLE NP=1,1,NP
 000B 8B 45 F8                              MOV %EAX,[%EBP-8]
 000E 89 45 F4                              MOV [%EBP-12],%EAX
 0011 C7 45 F8 00 00 00 00                  MOV DWORD PTR [%EBP-8],#0
 0018                      L1001  EQU $
 0018 8B 45 F8                              MOV %EAX,[%EBP-8]
 001B 3B 45 F4                              CMP %EAX,[%EBP-12]
 001E 74 00                                 JE L1002
 0020 40                                    INC %EAX
 0021 89 45 F8                              MOV [%EBP-8],%EAX
     6      WRITE(NP, 0); NEWLINE
 0024 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0027 6A 00                                 PUSH #0
 0029 E8 40 00                              CALL 'WRITE' (EXTERN 64)
 002C 83 C4 08                              ADD %ESP,#8
 002F E8 43 00                              CALL 'NEWLINE' (EXTERN 67)
     7    %REPEAT
 0032 EB 00                                 JMP L1001
 0034                      L1002  EQU $
     8  %ENDOFPROGRAM
 0034 C9                                    LEAVE
 0035 C3                                    RET

     8 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test209.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        4 |        8 |      58 |       0 |      32 |         90 |
 +----------+----------+----------+---------+---------+---------+------------+


