| MODULE Harmonic; (*NW 27.1.2013*) |
| .MODULE Harmonic (KEY 894E9AA5, VERSION 1, SIZE 00000220) |
| .IMPORT Texts (KEY 0B9E9984) |
| .IMPORT Fonts (KEY F4C9F557) |
| .IMPORT Files (KEY 73F5D686) |
| .IMPORT Oberon (KEY A89CCEE2) |
| .IMPORT Display (KEY 4C08D3EA) |
| .IMPORT Viewers (KEY 25ABF199) |
| .DATA 28H |
| .POINTER_REFERENCES 0H 4H 24H 18H |
| .FIXUP T 0H |
| IMPORT Texts, Oberon; |
| VAR W: Texts.Writer; |
| |
| PROCEDURE Compute*; |
| VAR n: INTEGER; |
| x0, x1, u: REAL; |
| S: Texts.Scanner; |
| BEGINa Texts.OpenScanner(S,b Oberon.Par.text,c Oberon.Par.pos)d;e Texts.Scan(S)f;g |
0000 | a .PROC 1 |
0000 | a .COMMAND Compute |
0000 | a(4EE90088): SUB SP, SP, 88H |
0001 | a(AFE00000): STR LNK, SP, 0H |
0002 | b(40E80014): ADD R0, SP, 14H |
0003 | b .FIXUP D |
0003 | b(8D100003): LDR SB, MT, MOD1 [Texts] |
0004 | b(41D80003): ADD R1, SB, VAR3 |
0005 | c .FIXUP D |
0005 | c(8D400002): LDR SB, MT, MOD4 [Oberon] |
0006 | c(42D8000E): ADD R2, SB, VAR14 |
0007 | c(82200008): LDR R2, R2, 8H |
0008 | d .FIXUP D |
0008 | d(8D400003): LDR SB, MT, MOD4 [Oberon] |
0009 | d(43D8000E): ADD R3, SB, VAR14 |
000A | d(8330000C): LDR R3, R3, CH |
000B | e .FIXUP P |
000B | e(F711500B): BL MOD1 [Texts] PROC21 |
000C | f(40E80014): ADD R0, SP, 14H |
000D | f .FIXUP D |
000D | f(8D100005): LDR SB, MT, MOD1 [Texts] |
000E | f(41D80003): ADD R1, SB, VAR3 |
000F | g .FIXUP P |
000F | g(F7116004): BL MOD1 [Texts] PROC22 |
| IF (S.class = Texts.Int)h & (iS.i > 0)j THENk |
0010 | h(80E00050): LDR R0, SP, 50H |
0011 | h(40090003): SUB R0, R0, 3H |
0012 | i(E900004D): BNE 77 [0060H] |
0013 | j(80E00054): LDR R0, SP, 54H |
0014 | j(40090000): SUB R0, R0, 0H |
0015 | k(E600004A): BLE 74 [0060H] |
| n := 0;l u := 0.0;m x0 := 0.0;n x1 := 0.0;o |
0016 | l(40000000): MOV R0, R0, 0H |
0017 | l(A0E00004): STR R0, SP, 4H |
0018 | m(40000000): MOV R0, R0, 0H |
0019 | m(A0E00010): STR R0, SP, 10H |
001A | n(40000000): MOV R0, R0, 0H |
001B | n(A0E00008): STR R0, SP, 8H |
001C | o(40000000): MOV R0, R0, 0H |
001D | o(A0E0000C): STR R0, SP, CH |
| WHILE n < S.i DOp INC(n);q u := u + 1.0;r x0 := x0 + 1.0/u ENDs ; |
001E | p(80E00004): LDR R0, SP, 4H |
001F | p(81E00054): LDR R1, SP, 54H |
0020 | p(00090001): SUB R0, R0, R1 |
0021 | p(ED00000E): BGE 14 [0030H] |
0022 | q(80E00004): LDR R0, SP, 4H |
0023 | q(40080001): ADD R0, R0, 1H |
0024 | q(A0E00004): STR R0, SP, 4H |
0025 | r(80E00010): LDR R0, SP, 10H |
0026 | r(61003F80): MOV' R1, R0, 3F80H |
0027 | r(000C0001): FAD R0, R0, R1 |
0028 | r(A0E00010): STR R0, SP, 10H |
0029 | s(60003F80): MOV' R0, R0, 3F80H |
002A | s(81E00010): LDR R1, SP, 10H |
002B | s(000F0001): FDV R0, R0, R1 |
002C | s(81E00008): LDR R1, SP, 8H |
002D | s(001C0000): FAD R0, R1, R0 |
002E | s(A0E00008): STR R0, SP, 8H |
002F | s(E7FFFFEE): B -18 [001EH] |
| WHILE n > 0 DOt x1 := x1 + 1.0/u;u u := u - 1.0;v DEC(n) ENDw ; |
0030 | t(80E00004): LDR R0, SP, 4H |
0031 | t(40090000): SUB R0, R0, 0H |
0032 | t(E600000E): BLE 14 [0041H] |
0033 | u(60003F80): MOV' R0, R0, 3F80H |
0034 | u(81E00010): LDR R1, SP, 10H |
0035 | u(000F0001): FDV R0, R0, R1 |
0036 | u(81E0000C): LDR R1, SP, CH |
0037 | u(001C0000): FAD R0, R1, R0 |
0038 | u(A0E0000C): STR R0, SP, CH |
0039 | v(80E00010): LDR R0, SP, 10H |
003A | v(61003F80): MOV' R1, R0, 3F80H |
003B | v(000D0001): FSB R0, R0, R1 |
003C | v(A0E00010): STR R0, SP, 10H |
003D | w(80E00004): LDR R0, SP, 4H |
003E | w(40090001): SUB R0, R0, 1H |
003F | w(A0E00004): STR R0, SP, 4H |
0040 | w(E7FFFFEF): B -17 [0030H] |
| Texts.WriteInt(W,x S.i,y 6)z;a Texts.WriteReal(W,b x0,c 15)d;e Texts.WriteReal(W,f x1,g 15)h;i |
0041 | x .FIXUP D |
0041 | x(8D000034): LDR SB, MT, MOD0 [Harmonic] |
0042 | x(40D80000): ADD R0, SB, 0H [data] |
0043 | x .FIXUP D |
0043 | x(8D100002): LDR SB, MT, MOD1 [Texts] |
0044 | x(41D80005): ADD R1, SB, VAR5 |
0045 | y(82E00054): LDR R2, SP, 54H |
0046 | z(43000006): MOV R3, R0, 6H |
0047 | a .FIXUP P |
0047 | a(F711E038): BL MOD1 [Texts] PROC30 |
0048 | b .FIXUP D |
0048 | b(8D000005): LDR SB, MT, MOD0 [Harmonic] |
0049 | b(40D80000): ADD R0, SB, 0H [data] |
004A | b .FIXUP D |
004A | b(8D100002): LDR SB, MT, MOD1 [Texts] |
004B | b(41D80005): ADD R1, SB, VAR5 |
004C | c(82E00008): LDR R2, SP, 8H |
004D | d(4300000F): MOV R3, R0, FH |
004E | e .FIXUP P |
004E | e(F7120007): BL MOD1 [Texts] PROC32 |
004F | f .FIXUP D |
004F | f(8D000005): LDR SB, MT, MOD0 [Harmonic] |
0050 | f(40D80000): ADD R0, SB, 0H [data] |
0051 | f .FIXUP D |
0051 | f(8D100002): LDR SB, MT, MOD1 [Texts] |
0052 | f(41D80005): ADD R1, SB, VAR5 |
0053 | g(82E0000C): LDR R2, SP, CH |
0054 | h(4300000F): MOV R3, R0, FH |
0055 | i .FIXUP P |
0055 | i(F7120007): BL MOD1 [Texts] PROC32 |
| Texts.WriteLn(W)j;k Texts.Append(Oberon.Log,l W.buf)m;n |
0056 | j .FIXUP D |
0056 | j(8D000005): LDR SB, MT, MOD0 [Harmonic] |
0057 | j(40D80000): ADD R0, SB, 0H [data] |
0058 | j .FIXUP D |
0058 | j(8D100002): LDR SB, MT, MOD1 [Texts] |
0059 | j(41D80005): ADD R1, SB, VAR5 |
005A | k .FIXUP P |
005A | k(F711C005): BL MOD1 [Texts] PROC28 |
005B | l .FIXUP D |
005B | l(8D400003): LDR SB, MT, MOD4 [Oberon] |
005C | l(80D0000D): LDR R0, SB, VAR13 |
005D | m .FIXUP D |
005D | m(8D000002): LDR SB, MT, MOD0 [Harmonic] |
005E | m(81D00000): LDR R1, SB, 0H [data] |
005F | n .FIXUP P |
005F | n(F710E005): BL MOD1 [Texts] PROC14 |
| END |
| ENDo Compute; |
0060 | o(8FE00000): LDR LNK, SP, 0H |
0061 | o(4EE80088): ADD SP, SP, 88H |
0062 | o(C700000F): B LNK |
| |
| BEGINp Texts.OpenWriter(W)q |
0063 | p .PROC 0 |
0063 | p .ENTRYPOINT |
0063 | p(4EE90004): SUB SP, SP, 4H |
0064 | p(AFE00000): STR LNK, SP, 0H |
0065 | q .FIXUP D |
0065 | q(8D000008): LDR SB, MT, MOD0 [Harmonic] |
0066 | q(40D80000): ADD R0, SB, 0H [data] |
0067 | q .FIXUP D |
0067 | q(8D100002): LDR SB, MT, MOD1 [Texts] |
0068 | q(41D80005): ADD R1, SB, VAR5 |
| ENDr Harmonic.s |
0069 | r .FIXUP P |
0069 | r(F711700A): BL MOD1 [Texts] PROC23 |
006A | s(8FE00000): LDR LNK, SP, 0H |
006B | s(4EE80004): ADD SP, SP, 4H |
006C | s(C700000F): B LNK |