| MODULE* Shifter; |
| .MODULE Shifter (KEY 00000000, VERSION 0, SIZE 000000F8) |
| .DATA 10H |
| .FIXUP T 0H |
| VARa x, y, z, d: INTEGER; |
0000 | e(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 z := 1;c d := 1;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(A0D00008): STR R0, SB, 8H |
000C | d(40000001): MOV R0, R0, 1H |
000D | d(A0D0000C): STR R0, SB, CH |
| REPEAT eLED(z);f x := 1000;g |
000E | f(80D00008): LDR R0, SB, 8H |
000F | f(5100FFC4): MOV R1, R0, FFFFFFC4H |
0010 | f(A0100000): STR R0, R1, 0H |
0011 | g(400003E8): MOV R0, R0, 3E8H |
0012 | g(A0D00000): STR R0, SB, 0H |
| REPEAT y := 1000;h |
0013 | h(400003E8): MOV R0, R0, 3E8H |
0014 | h(A0D00004): STR R0, SB, 4H |
| REPEAT y := y-1 UNTILi y = 0;j |
0015 | i(80D00004): LDR R0, SB, 4H |
0016 | i(40090001): SUB R0, R0, 1H |
0017 | i(A0D00004): STR R0, SB, 4H |
0018 | j(80D00004): LDR R0, SB, 4H |
0019 | j(E9FFFFFB): BNE -5 [0015H] |
| x := x-1 |
| UNTILk x = 0;l |
001A | k(80D00000): LDR R0, SB, 0H |
001B | k(40090001): SUB R0, R0, 1H |
001C | k(A0D00000): STR R0, SB, 0H |
001D | l(80D00000): LDR R0, SB, 0H |
001E | l(E9FFFFF4): BNE -12 [0013H] |
| IF z = 128 THENm d := -1 ELSIFn zo = 1 THENp d := 1 ENDq ; |
001F | m(80D00008): LDR R0, SB, 8H |
0020 | m(40090080): SUB R0, R0, 80H |
0021 | m(E9000003): BNE 3 [0025H] |
0022 | n(5000FFFF): MOV R0, R0, FFFFFFFFH |
0023 | n(A0D0000C): STR R0, SB, CH |
0024 | o(E7000005): B 5 [002AH] |
0025 | p(80D00008): LDR R0, SB, 8H |
0026 | p(40090001): SUB R0, R0, 1H |
0027 | p(E9000002): BNE 2 [002AH] |
0028 | q(40000001): MOV R0, R0, 1H |
0029 | q(A0D0000C): STR R0, SB, CH |
| IF d = 1 THENr z := LSL(z, 1) ELSEs zt := ASR(z, 1) ENDu |
002A | r(80D0000C): LDR R0, SB, CH |
002B | r(40090001): SUB R0, R0, 1H |
002C | r(E9000004): BNE 4 [0031H] |
002D | s(80D00008): LDR R0, SB, 8H |
002E | s(40010001): LSL R0, R0, 1H |
002F | s(A0D00008): STR R0, SB, 8H |
0030 | t(E7000003): B 3 [0034H] |
0031 | u(80D00008): LDR R0, SB, 8H |
0032 | u(40020001): ASR R0, R0, 1H |
0033 | u(A0D00008): STR R0, SB, 8H |
| UNTIL FALSE |
| ENDv Shifter.w |
0034 | v(E7FFFFD9): B -39 [000EH] |
0035 | w(40000000): MOV R0, R0, 0H |
0036 | w(C7000000): B R0 |