| MODULE* Counter; |
| .MODULE Counter (KEY 00000000, VERSION 0, SIZE 000000B0) |
| .DATA CH |
| .FIXUP T 0H |
| VARa x, y, z: INTEGER; |
0000 | n(E7000007): B 7 [0008H] |
0001 | a(00000000): MOV R0, R0, R0 |
0002 | a(00000000): MOV R0, R0, R0 |
0003 | a(00000000): MOV R0, R0, R0 |
0004 | a(00000000): MOV R0, R0, R0 |
0005 | a(00000000): MOV R0, R0, R0 |
0006 | a(00000000): MOV R0, R0, R0 |
0007 | a(00000000): MOV R0, R0, R0 |
| BEGINb LED(1);c z := 0;d |
0008 | b .PROC 0 |
0008 | b .ENTRYPOINT |
0008 | b(4D000000): MOV SB, R0, 0H |
0009 | b(5E00FFC0): MOV SP, R0, FFFFFFC0H |
000A | c(40000001): MOV R0, R0, 1H |
000B | c(5100FFC4): MOV R1, R0, FFFFFFC4H |
000C | c(A0100000): STR R0, R1, 0H |
000D | d(40000000): MOV R0, R0, 0H |
000E | d(A0D00008): STR R0, SB, 8H |
| REPEAT LED(z);e x := 1000;f |
000F | e(80D00008): LDR R0, SB, 8H |
0010 | e(5100FFC4): MOV R1, R0, FFFFFFC4H |
0011 | e(A0100000): STR R0, R1, 0H |
0012 | f(400003E8): MOV R0, R0, 3E8H |
0013 | f(A0D00000): STR R0, SB, 0H |
| REPEAT y := 1000;g |
0014 | g(400003E8): MOV R0, R0, 3E8H |
0015 | g(A0D00004): STR R0, SB, 4H |
| REPEAT y := y-1 UNTILh y = 0;i |
0016 | h(80D00004): LDR R0, SB, 4H |
0017 | h(40090001): SUB R0, R0, 1H |
0018 | h(A0D00004): STR R0, SB, 4H |
0019 | i(80D00004): LDR R0, SB, 4H |
001A | i(E9FFFFFB): BNE -5 [0016H] |
| x := x-1 |
| UNTILj x = 0;k |
001B | j(80D00000): LDR R0, SB, 0H |
001C | j(40090001): SUB R0, R0, 1H |
001D | j(A0D00000): STR R0, SB, 0H |
001E | k(80D00000): LDR R0, SB, 0H |
001F | k(E9FFFFF4): BNE -12 [0014H] |
| z := z+1 |
| UNTILl FALSE |
0020 | l(80D00008): LDR R0, SB, 8H |
0021 | l(40080001): ADD R0, R0, 1H |
0022 | l(A0D00008): STR R0, SB, 8H |
| ENDm Counter.n |
0023 | m(E7FFFFEB): B -21 [000FH] |
0024 | n(40000000): MOV R0, R0, 0H |
0025 | n(C7000000): B R0 |