| MODULE RS232; (*NW 3.1.2012*) |
| .MODULE RS232 (KEY F37C22EC, VERSION 1, SIZE 0000038C) |
| .FIXUP T 0H |
| IMPORT SYSTEM; |
| CONST data = -56; stat = -52; |
| |
| PROCEDURE Send*(x: INTEGER); |
| BEGINa |
0000 | a .PROC 1 |
0000 | a(4EE90008): SUB SP, SP, 8H |
0001 | a(AFE00000): STR LNK, SP, 0H |
0002 | a(A0E00004): STR R0, SP, 4H |
| REPEAT UNTIL SYSTEM.BIT(stat, 1);b |
0003 | b(5000FFCC): MOV R0, R0, FFFFFFCCH |
0004 | b(80000000): LDR R0, R0, 0H |
0005 | b(40030002): ROR R0, R0, 2H |
0006 | b(E8FFFFFC): BPL -4 [0003H] |
| SYSTEM.PUT(data, x) |
| ENDc Send; |
0007 | c(5000FFC8): MOV R0, R0, FFFFFFC8H |
0008 | c(81E00004): LDR R1, SP, 4H |
0009 | c(A1000000): STR R1, R0, 0H |
000A | c(8FE00000): LDR LNK, SP, 0H |
000B | c(4EE80008): ADD SP, SP, 8H |
000C | c(C700000F): B LNK |
| |
| PROCEDURE Rec*(VAR x: INTEGER); |
| BEGINd |
000D | d .PROC 2 |
000D | d(4EE90008): SUB SP, SP, 8H |
000E | d(AFE00000): STR LNK, SP, 0H |
000F | d(A0E00004): STR R0, SP, 4H |
| REPEAT UNTIL SYSTEM.BIT(stat, 0);e |
0010 | e(5000FFCC): MOV R0, R0, FFFFFFCCH |
0011 | e(80000000): LDR R0, R0, 0H |
0012 | e(40030001): ROR R0, R0, 1H |
0013 | e(E8FFFFFC): BPL -4 [0010H] |
| SYSTEM.GET(data, x) |
| ENDf Rec; |
0014 | f(5000FFC8): MOV R0, R0, FFFFFFC8H |
0015 | f(80000000): LDR R0, R0, 0H |
0016 | f(81E00004): LDR R1, SP, 4H |
0017 | f(A0100000): STR R0, R1, 0H |
0018 | f(8FE00000): LDR LNK, SP, 0H |
0019 | f(4EE80008): ADD SP, SP, 8H |
001A | f(C700000F): B LNK |
| |
| PROCEDURE SendInt*(x: INTEGER); |
| VAR i: INTEGER; |
| BEGINg Send(1)h;i i := 4;j |
001B | g .PROC 3 |
001B | g(4EE9000C): SUB SP, SP, CH |
001C | g(AFE00000): STR LNK, SP, 0H |
001D | g(A0E00004): STR R0, SP, 4H |
001E | h(40000001): MOV R0, R0, 1H |
001F | i(F7FFFFE0): BL -32 [0000H] |
0020 | j(40000004): MOV R0, R0, 4H |
0021 | j(A0E00008): STR R0, SP, 8H |
| REPEAT i := i-1;k Send(x)l;m x := ROR(x, 8) UNTILn i = 0 |
0022 | k(80E00008): LDR R0, SP, 8H |
0023 | k(40090001): SUB R0, R0, 1H |
0024 | k(A0E00008): STR R0, SP, 8H |
0025 | l(80E00004): LDR R0, SP, 4H |
0026 | m(F7FFFFD9): BL -39 [0000H] |
0027 | n(80E00004): LDR R0, SP, 4H |
0028 | n(40030008): ROR R0, R0, 8H |
0029 | n(A0E00004): STR R0, SP, 4H |
| ENDo SendInt; |
002A | o(80E00008): LDR R0, SP, 8H |
002B | o(E9FFFFF6): BNE -10 [0022H] |
002C | o(8FE00000): LDR LNK, SP, 0H |
002D | o(4EE8000C): ADD SP, SP, CH |
002E | o(C700000F): B LNK |
| |
| PROCEDURE SendHex*(x: INTEGER); |
| VAR i: INTEGER; |
| BEGINp Send(2)q;r i := 4;s |
002F | p .PROC 4 |
002F | p(4EE9000C): SUB SP, SP, CH |
0030 | p(AFE00000): STR LNK, SP, 0H |
0031 | p(A0E00004): STR R0, SP, 4H |
0032 | q(40000002): MOV R0, R0, 2H |
0033 | r(F7FFFFCC): BL -52 [0000H] |
0034 | s(40000004): MOV R0, R0, 4H |
0035 | s(A0E00008): STR R0, SP, 8H |
| REPEAT i := i-1;t Send(x)u;v x := ROR(x, 8) UNTILw i = 0 |
0036 | t(80E00008): LDR R0, SP, 8H |
0037 | t(40090001): SUB R0, R0, 1H |
0038 | t(A0E00008): STR R0, SP, 8H |
0039 | u(80E00004): LDR R0, SP, 4H |
003A | v(F7FFFFC5): BL -59 [0000H] |
003B | w(80E00004): LDR R0, SP, 4H |
003C | w(40030008): ROR R0, R0, 8H |
003D | w(A0E00004): STR R0, SP, 4H |
| ENDx SendHex; |
003E | x(80E00008): LDR R0, SP, 8H |
003F | x(E9FFFFF6): BNE -10 [0036H] |
0040 | x(8FE00000): LDR LNK, SP, 0H |
0041 | x(4EE8000C): ADD SP, SP, CH |
0042 | x(C700000F): B LNK |
| |
| PROCEDURE SendReal*(x: REAL); |
| VAR i, u: INTEGER; |
| BEGINy Send(3)z;a u := ORD(x);b i := 4;c |
0043 | y .PROC 5 |
0043 | y(4EE90010): SUB SP, SP, 10H |
0044 | y(AFE00000): STR LNK, SP, 0H |
0045 | y(A0E00004): STR R0, SP, 4H |
0046 | z(40000003): MOV R0, R0, 3H |
0047 | a(F7FFFFB8): BL -72 [0000H] |
0048 | b(80E00004): LDR R0, SP, 4H |
0049 | b(A0E0000C): STR R0, SP, CH |
004A | c(40000004): MOV R0, R0, 4H |
004B | c(A0E00008): STR R0, SP, 8H |
| REPEAT i := i-1;d Send(u)e;f u := ROR(u, 8) UNTILg i = 0 |
004C | d(80E00008): LDR R0, SP, 8H |
004D | d(40090001): SUB R0, R0, 1H |
004E | d(A0E00008): STR R0, SP, 8H |
004F | e(80E0000C): LDR R0, SP, CH |
0050 | f(F7FFFFAF): BL -81 [0000H] |
0051 | g(80E0000C): LDR R0, SP, CH |
0052 | g(40030008): ROR R0, R0, 8H |
0053 | g(A0E0000C): STR R0, SP, CH |
| ENDh SendReal; |
0054 | h(80E00008): LDR R0, SP, 8H |
0055 | h(E9FFFFF6): BNE -10 [004CH] |
0056 | h(8FE00000): LDR LNK, SP, 0H |
0057 | h(4EE80010): ADD SP, SP, 10H |
0058 | h(C700000F): B LNK |
| |
| PROCEDURE SendStr*(x: ARRAY OF CHAR); |
| VAR i, k: INTEGER; |
| BEGINi Send(4)j;k i := 0;l |
0059 | i .PROC 6 |
0059 | i(4EE90014): SUB SP, SP, 14H |
005A | i(AFE00000): STR LNK, SP, 0H |
005B | i(A0E00004): STR R0, SP, 4H |
005C | i(A1E00008): STR R1, SP, 8H |
005D | j(40000004): MOV R0, R0, 4H |
005E | k(F7FFFFA1): BL -95 [0000H] |
005F | l(40000000): MOV R0, R0, 0H |
0060 | l(A0E0000C): STR R0, SP, CH |
| REPEAT k := ORD(x[i]m);n Send(k)o;p INC(i) UNTILq k = 0 |
0061 | m(80E0000C): LDR R0, SP, CH |
0062 | m(81E00008): LDR R1, SP, 8H |
0063 | m(01090001): SUB R1, R0, R1 |
0064 | m(DA03841C): BLCC MT [trap=1, pos=900] |
0065 | m(81E00004): LDR R1, SP, 4H |
0066 | m(00180000): ADD R0, R1, R0 |
0067 | n(90000000): LDR R0, R0, 0H |
0068 | n(A0E00010): STR R0, SP, 10H |
0069 | o(80E00010): LDR R0, SP, 10H |
006A | p(F7FFFF95): BL -107 [0000H] |
006B | q(80E0000C): LDR R0, SP, CH |
006C | q(40080001): ADD R0, R0, 1H |
006D | q(A0E0000C): STR R0, SP, CH |
| ENDr SendStr; |
006E | r(80E00010): LDR R0, SP, 10H |
006F | r(E9FFFFF1): BNE -15 [0061H] |
0070 | r(8FE00000): LDR LNK, SP, 0H |
0071 | r(4EE80014): ADD SP, SP, 14H |
0072 | r(C700000F): B LNK |
| |
| PROCEDURE RecInt*(VAR x: INTEGER); |
| VAR i, x0, y: INTEGER; |
| BEGINs i := 4;t x0 := 0;u |
0073 | s .PROC 7 |
0073 | s(4EE90014): SUB SP, SP, 14H |
0074 | s(AFE00000): STR LNK, SP, 0H |
0075 | s(A0E00004): STR R0, SP, 4H |
0076 | t(40000004): MOV R0, R0, 4H |
0077 | t(A0E00008): STR R0, SP, 8H |
0078 | u(40000000): MOV R0, R0, 0H |
0079 | u(A0E0000C): STR R0, SP, CH |
| REPEAT i := i-1;v Rec(y)w;x x0 := ROR(x0+y,y 8) UNTILz i = 0;a |
007A | v(80E00008): LDR R0, SP, 8H |
007B | v(40090001): SUB R0, R0, 1H |
007C | v(A0E00008): STR R0, SP, 8H |
007D | w(40E80010): ADD R0, SP, 10H |
007E | x(F7FFFF8E): BL -114 [000DH] |
007F | y(80E0000C): LDR R0, SP, CH |
0080 | y(81E00010): LDR R1, SP, 10H |
0081 | y(00080001): ADD R0, R0, R1 |
0082 | z(40030008): ROR R0, R0, 8H |
0083 | z(A0E0000C): STR R0, SP, CH |
0084 | a(80E00008): LDR R0, SP, 8H |
0085 | a(E9FFFFF4): BNE -12 [007AH] |
| x := x0 |
| ENDb RecInt; |
0086 | b(80E0000C): LDR R0, SP, CH |
0087 | b(81E00004): LDR R1, SP, 4H |
0088 | b(A0100000): STR R0, R1, 0H |
0089 | b(8FE00000): LDR LNK, SP, 0H |
008A | b(4EE80014): ADD SP, SP, 14H |
008B | b(C700000F): B LNK |
| |
| PROCEDURE RecReal*(VAR x: REAL); |
| VAR i, x0, y: INTEGER; |
| BEGINc i := 4;d x0 := 0;e |
008C | c .PROC 8 |
008C | c(4EE90014): SUB SP, SP, 14H |
008D | c(AFE00000): STR LNK, SP, 0H |
008E | c(A0E00004): STR R0, SP, 4H |
008F | d(40000004): MOV R0, R0, 4H |
0090 | d(A0E00008): STR R0, SP, 8H |
0091 | e(40000000): MOV R0, R0, 0H |
0092 | e(A0E0000C): STR R0, SP, CH |
| REPEAT i := i-1;f Rec(y)g;h x0 := ROR(x0+y,i 8) UNTILj i = 0;k |
0093 | f(80E00008): LDR R0, SP, 8H |
0094 | f(40090001): SUB R0, R0, 1H |
0095 | f(A0E00008): STR R0, SP, 8H |
0096 | g(40E80010): ADD R0, SP, 10H |
0097 | h(F7FFFF75): BL -139 [000DH] |
0098 | i(80E0000C): LDR R0, SP, CH |
0099 | i(81E00010): LDR R1, SP, 10H |
009A | i(00080001): ADD R0, R0, R1 |
009B | j(40030008): ROR R0, R0, 8H |
009C | j(A0E0000C): STR R0, SP, CH |
009D | k(80E00008): LDR R0, SP, 8H |
009E | k(E9FFFFF4): BNE -12 [0093H] |
| x := SYSTEM.VAL(REAL, x0) |
| ENDl RecReal; |
009F | l(80E0000C): LDR R0, SP, CH |
00A0 | l(81E00004): LDR R1, SP, 4H |
00A1 | l(A0100000): STR R0, R1, 0H |
00A2 | l(8FE00000): LDR LNK, SP, 0H |
00A3 | l(4EE80014): ADD SP, SP, 14H |
00A4 | l(C700000F): B LNK |
| |
| PROCEDURE RecStr*(VAR x: ARRAY OF CHAR); |
| VAR i, k: INTEGER; |
| BEGINm i := 0;n |
00A5 | m .PROC 9 |
00A5 | m(4EE90014): SUB SP, SP, 14H |
00A6 | m(AFE00000): STR LNK, SP, 0H |
00A7 | m(A0E00004): STR R0, SP, 4H |
00A8 | m(A1E00008): STR R1, SP, 8H |
00A9 | n(40000000): MOV R0, R0, 0H |
00AA | n(A0E0000C): STR R0, SP, CH |
| REPEAT Rec(k)o;p x[i]q := CHR(k);r INC(i) UNTILs k = 0 |
00AB | o(40E80010): ADD R0, SP, 10H |
00AC | p(F7FFFF60): BL -160 [000DH] |
00AD | q(80E0000C): LDR R0, SP, CH |
00AE | q(81E00008): LDR R1, SP, 8H |
00AF | q(01090001): SUB R1, R0, R1 |
00B0 | q(DA058F1C): BLCC MT [trap=1, pos=1423] |
00B1 | q(81E00004): LDR R1, SP, 4H |
00B2 | q(00180000): ADD R0, R1, R0 |
00B3 | r(81E00010): LDR R1, SP, 10H |
00B4 | r(B1000000): STR R1, R0, 0H |
00B5 | s(80E0000C): LDR R0, SP, CH |
00B6 | s(40080001): ADD R0, R0, 1H |
00B7 | s(A0E0000C): STR R0, SP, CH |
| ENDt RecStr; |
00B8 | t(80E00010): LDR R0, SP, 10H |
00B9 | t(E9FFFFF1): BNE -15 [00ABH] |
00BA | t(8FE00000): LDR LNK, SP, 0H |
00BB | t(4EE80014): ADD SP, SP, 14H |
00BC | t(C700000F): B LNK |
| |
| PROCEDURE Line*; |
| BEGINu Send(6)v |
00BD | u .PROC 10 |
00BD | u .COMMAND Line |
00BD | u(4EE90004): SUB SP, SP, 4H |
00BE | u(AFE00000): STR LNK, SP, 0H |
00BF | v(40000006): MOV R0, R0, 6H |
| ENDw Line; |
00C0 | w(F7FFFF3F): BL -193 [0000H] |
00C1 | w(8FE00000): LDR LNK, SP, 0H |
00C2 | w(4EE80004): ADD SP, SP, 4H |
00C3 | w(C700000F): B LNK |
| |
| PROCEDURE End*; |
| BEGINx Send(7)y |
00C4 | x .PROC 11 |
00C4 | x .COMMAND End |
00C4 | x(4EE90004): SUB SP, SP, 4H |
00C5 | x(AFE00000): STR LNK, SP, 0H |
00C6 | y(40000007): MOV R0, R0, 7H |
| ENDz End; |
00C7 | z(F7FFFF38): BL -200 [0000H] |
00C8 | z(8FE00000): LDR LNK, SP, 0H |
00C9 | z(4EE80004): ADD SP, SP, 4H |
00CA | z(C700000F): B LNK |
| |
| BEGINa END RS232.b |
00CB | a .PROC 0 |
00CB | a .ENTRYPOINT |
00CB | a(4EE90004): SUB SP, SP, 4H |
00CC | a(AFE00000): STR LNK, SP, 0H |
00CD | b(8FE00000): LDR LNK, SP, 0H |
00CE | b(4EE80004): ADD SP, SP, 4H |
00CF | b(C700000F): B LNK |