| MODULE PCLink1; (*NW 25.7.2013 for Oberon on RISC*) |
| .MODULE PCLink1 (KEY 6544058C, VERSION 1, SIZE 0000069C) |
| .IMPORT Files (KEY 73F5D686) |
| .IMPORT Texts (KEY 0B9E9984) |
| .IMPORT Fonts (KEY F4C9F557) |
| .IMPORT Oberon (KEY A89CCEE2) |
| .IMPORT Display (KEY 4C08D3EA) |
| .IMPORT Viewers (KEY 25ABF199) |
| .DATA 2CH |
| .STRING 2CH "sending " |
| .STRING 38H " done" |
| .STRING 40H "receiving " |
| .STRING 4CH " done" |
| .STRING 54H "PCLink started" |
| .STRING 64H "PCLink stopped" |
| .POINTER_REFERENCES 0H 4H 8H 28H 1CH |
| .FIXUP T 0H |
| IMPORT SYSTEM, Files, Texts, Oberon; |
| |
| CONST data = -56; stat = -52; |
| BlkLen = 255; |
| REQ = 20H; REC = 21H; SND = 22H; ACK = 10H; NAK = 11H; |
| |
| VAR T: Oberon.Task; |
| W: Texts.Writer; |
| |
| PROCEDURE Rec(VAR x: BYTE); |
| BEGINa |
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, 0);b |
0003 | b(5000FFCC): MOV R0, R0, FFFFFFCCH |
0004 | b(80000000): LDR R0, R0, 0H |
0005 | b(40030001): ROR R0, R0, 1H |
0006 | b(E8FFFFFC): BPL -4 [0003H] |
| SYSTEM.GET(data, x) |
| ENDc Rec; |
0007 | c(5000FFC8): MOV R0, R0, FFFFFFC8H |
0008 | c(90000000): LDR R0, R0, 0H |
0009 | c(81E00004): LDR R1, SP, 4H |
000A | c(B0100000): STR R0, R1, 0H |
000B | c(8FE00000): LDR LNK, SP, 0H |
000C | c(4EE80008): ADD SP, SP, 8H |
000D | c(C700000F): B LNK |
| |
| PROCEDURE RecName(VAR s: ARRAY OF CHAR); |
| VAR i: INTEGER; x: BYTE; |
| BEGINd i := 0;e Rec(x)f;g |
000E | d(4EE90014): SUB SP, SP, 14H |
000F | d(AFE00000): STR LNK, SP, 0H |
0010 | d(A0E00004): STR R0, SP, 4H |
0011 | d(A1E00008): STR R1, SP, 8H |
0012 | e(40000000): MOV R0, R0, 0H |
0013 | e(A0E0000C): STR R0, SP, CH |
0014 | f(40E80010): ADD R0, SP, 10H |
0015 | g(F7FFFFEA): BL -22 [0000H] |
| WHILE x > 0 DOh s[i]i := CHR(x);j INC(i);k Rec(x)l ENDm ; |
0016 | h(90E00010): LDR R0, SP, 10H |
0017 | h(40090000): SUB R0, R0, 0H |
0018 | h(E600000E): BLE 14 [0027H] |
0019 | i(80E0000C): LDR R0, SP, CH |
001A | i(81E00008): LDR R1, SP, 8H |
001B | i(01090001): SUB R1, R0, R1 |
001C | i(DA01E11C): BLCC MT [trap=1, pos=481] |
001D | i(81E00004): LDR R1, SP, 4H |
001E | i(00180000): ADD R0, R1, R0 |
001F | j(91E00010): LDR R1, SP, 10H |
0020 | j(B1000000): STR R1, R0, 0H |
0021 | k(80E0000C): LDR R0, SP, CH |
0022 | k(40080001): ADD R0, R0, 1H |
0023 | k(A0E0000C): STR R0, SP, CH |
0024 | l(40E80010): ADD R0, SP, 10H |
0025 | m(F7FFFFDA): BL -38 [0000H] |
0026 | m(E7FFFFEF): B -17 [0016H] |
| s[i]n := 0X |
0027 | n(80E0000C): LDR R0, SP, CH |
0028 | n(81E00008): LDR R1, SP, 8H |
0029 | n(01090001): SUB R1, R0, R1 |
002A | n(DA020A1C): BLCC MT [trap=1, pos=522] |
002B | n(81E00004): LDR R1, SP, 4H |
002C | n(00180000): ADD R0, R1, R0 |
| ENDo RecName; |
002D | o(41000000): MOV R1, R0, 0H |
002E | o(B1000000): STR R1, R0, 0H |
002F | o(8FE00000): LDR LNK, SP, 0H |
0030 | o(4EE80014): ADD SP, SP, 14H |
0031 | o(C700000F): B LNK |
| |
| PROCEDURE Send(x: BYTE); |
| BEGINp |
0032 | p(4EE90008): SUB SP, SP, 8H |
0033 | p(AFE00000): STR LNK, SP, 0H |
0034 | p(A0E00004): STR R0, SP, 4H |
| REPEAT UNTIL SYSTEM.BIT(stat, 1);q |
0035 | q(5000FFCC): MOV R0, R0, FFFFFFCCH |
0036 | q(80000000): LDR R0, R0, 0H |
0037 | q(40030002): ROR R0, R0, 2H |
0038 | q(E8FFFFFC): BPL -4 [0035H] |
| SYSTEM.PUT(data, x) |
| ENDr Send; |
0039 | r(5000FFC8): MOV R0, R0, FFFFFFC8H |
003A | r(91E00004): LDR R1, SP, 4H |
003B | r(B1000000): STR R1, R0, 0H |
003C | r(8FE00000): LDR LNK, SP, 0H |
003D | r(4EE80008): ADD SP, SP, 8H |
003E | r(C700000F): B LNK |
| |
| PROCEDURE Task; |
| VAR len, n, i: INTEGER; |
| x, ack, len1, code: BYTE; |
| name: ARRAY 32 OF CHAR; |
| F: Files.File; R: Files.Rider; |
| buf: ARRAY 256 OF BYTE; |
| BEGINs |
003F | s(4EE90150): SUB SP, SP, 150H |
0040 | s(AFE00000): STR LNK, SP, 0H |
| IF SYSTEM.BIT(stat, 0) THENt (*byte available*) |
0041 | t(5000FFCC): MOV R0, R0, FFFFFFCCH |
0042 | t(80000000): LDR R0, R0, 0H |
0043 | t(40030001): ROR R0, R0, 1H |
0044 | t(E80000E9): BPL 233 [012EH] |
| Rec(code)u;v |
0045 | u(40E80013): ADD R0, SP, 13H |
0046 | v(F7FFFFB9): BL -71 [0000H] |
| IF code = SND THENw (*send file*) |
0047 | w(90E00013): LDR R0, SP, 13H |
0048 | w(40090022): SUB R0, R0, 22H |
0049 | w(E9000069): BNE 105 [00B3H] |
| LED(20H);x RecName(name)y;z F := Files.Old(name)a;b |
004A | x(40000020): MOV R0, R0, 20H |
004B | x(5100FFC4): MOV R1, R0, FFFFFFC4H |
004C | x(A0100000): STR R0, R1, 0H |
004D | y(40E80014): ADD R0, SP, 14H |
004E | y(41000020): MOV R1, R0, 20H |
004F | z(F7FFFFBE): BL -66 [000EH] |
0050 | a(40E80014): ADD R0, SP, 14H |
0051 | a(41000020): MOV R1, R0, 20H |
0052 | b .FIXUP P |
0052 | b(F7102052): BL MOD1 [Files] PROC2 |
0053 | b(A0E00034): STR R0, SP, 34H |
| IF F # NIL THENc |
0054 | c(80E00034): LDR R0, SP, 34H |
0055 | c(E100005A): BEQ 90 [00B0H] |
| Texts.WriteString(W,d "sending ")e;f Texts.WriteString(W,g name)h;i |
0056 | d .FIXUP D |
0056 | d(8D000056): LDR SB, MT, MOD0 [PCLink1] |
0057 | d(40D80004): ADD R0, SB, 4H [data] |
0058 | d .FIXUP D |
0058 | d(8D200002): LDR SB, MT, MOD2 [Texts] |
0059 | d(41D80005): ADD R1, SB, VAR5 |
005A | e .FIXUP D |
005A | e(8D000002): LDR SB, MT, MOD0 [PCLink1] |
005B | e(42D8002C): ADD R2, SB, 2CH ["sending "] |
005C | e(43000009): MOV R3, R0, 9H |
005D | f .FIXUP P |
005D | f(F721D00B): BL MOD2 [Texts] PROC29 |
005E | g .FIXUP D |
005E | g(8D000004): LDR SB, MT, MOD0 [PCLink1] |
005F | g(40D80004): ADD R0, SB, 4H [data] |
0060 | g .FIXUP D |
0060 | g(8D200002): LDR SB, MT, MOD2 [Texts] |
0061 | g(41D80005): ADD R1, SB, VAR5 |
0062 | h(42E80014): ADD R2, SP, 14H |
0063 | h(43000020): MOV R3, R0, 20H |
0064 | i .FIXUP P |
0064 | i(F721D007): BL MOD2 [Texts] PROC29 |
| Texts.Append(Oberon.Log,j W.buf)k;l |
0065 | j .FIXUP D |
0065 | j(8D400005): LDR SB, MT, MOD4 [Oberon] |
0066 | j(80D0000D): LDR R0, SB, VAR13 |
0067 | k .FIXUP D |
0067 | k(8D000002): LDR SB, MT, MOD0 [PCLink1] |
0068 | k(81D00004): LDR R1, SB, 4H [data] |
0069 | l .FIXUP P |
0069 | l(F720E005): BL MOD2 [Texts] PROC14 |
| Send(ACK)m;n len := Files.Length(F)o;p Files.Set(R,q F,r 0)s;t |
006A | m(40000010): MOV R0, R0, 10H |
006B | n(F7FFFFC6): BL -58 [0032H] |
006C | o(80E00034): LDR R0, SP, 34H |
006D | p .FIXUP P |
006D | p(F7109004): BL MOD1 [Files] PROC9 |
006E | p(A0E00004): STR R0, SP, 4H |
006F | q(40E80038): ADD R0, SP, 38H |
0070 | q .FIXUP D |
0070 | q(8D100009): LDR SB, MT, MOD1 [Files] |
0071 | q(41D80001): ADD R1, SB, VAR1 |
0072 | r(82E00034): LDR R2, SP, 34H |
0073 | s(43000000): MOV R3, R0, 0H |
0074 | t .FIXUP P |
0074 | t(F710B007): BL MOD1 [Files] PROC11 |
| REPEAT |
| IF len >= BlkLen THENu len1 := BlkLen ELSEv len1w := len ENDx ; |
0075 | u(80E00004): LDR R0, SP, 4H |
0076 | u(400900FF): SUB R0, R0, FFH |
0077 | u(E5000003): BLT 3 [007BH] |
0078 | v(400000FF): MOV R0, R0, FFH |
0079 | v(B0E00012): STR R0, SP, 12H |
007A | w(E7000002): B 2 [007DH] |
007B | x(80E00004): LDR R0, SP, 4H |
007C | x(B0E00012): STR R0, SP, 12H |
| Send(len1)y;z n := len1;a len := len - len1;b |
007D | y(90E00012): LDR R0, SP, 12H |
007E | z(F7FFFFB3): BL -77 [0032H] |
007F | a(90E00012): LDR R0, SP, 12H |
0080 | a(A0E00008): STR R0, SP, 8H |
0081 | b(80E00004): LDR R0, SP, 4H |
0082 | b(91E00012): LDR R1, SP, 12H |
0083 | b(00090001): SUB R0, R0, R1 |
0084 | b(A0E00004): STR R0, SP, 4H |
| WHILE n > 0 DOc Files.ReadByte(R,d x)e;f Send(x)g;h DEC(n) ENDi ; |
0085 | c(80E00008): LDR R0, SP, 8H |
0086 | c(40090000): SUB R0, R0, 0H |
0087 | c(E600000B): BLE 11 [0093H] |
0088 | d(40E80038): ADD R0, SP, 38H |
0089 | d .FIXUP D |
0089 | d(8D100019): LDR SB, MT, MOD1 [Files] |
008A | d(41D80001): ADD R1, SB, VAR1 |
008B | e(42E80010): ADD R2, SP, 10H |
008C | f .FIXUP P |
008C | f(F710E018): BL MOD1 [Files] PROC14 |
008D | g(90E00010): LDR R0, SP, 10H |
008E | h(F7FFFFA3): BL -93 [0032H] |
008F | i(80E00008): LDR R0, SP, 8H |
0090 | i(40090001): SUB R0, R0, 1H |
0091 | i(A0E00008): STR R0, SP, 8H |
0092 | i(E7FFFFF2): B -14 [0085H] |
| Rec(ack)j;k |
0093 | j(40E80011): ADD R0, SP, 11H |
0094 | k(F7FFFF6B): BL -149 [0000H] |
| IF ack # ACK THENl len1 := 0 ENDm |
0095 | l(90E00011): LDR R0, SP, 11H |
0096 | l(40090010): SUB R0, R0, 10H |
0097 | l(E1000002): BEQ 2 [009AH] |
0098 | m(40000000): MOV R0, R0, 0H |
0099 | m(B0E00012): STR R0, SP, 12H |
| UNTIL len1 < BlkLen;n |
009A | n(90E00012): LDR R0, SP, 12H |
009B | n(400900FF): SUB R0, R0, FFH |
009C | n(EDFFFFD8): BGE -40 [0075H] |
| Texts.WriteString(W,o " done")p;q Texts.WriteLn(W)r;s Texts.Append(Oberon.Log,t W.buf)u |
009D | o .FIXUP D |
009D | o(8D000014): LDR SB, MT, MOD0 [PCLink1] |
009E | o(40D80004): ADD R0, SB, 4H [data] |
009F | o .FIXUP D |
009F | o(8D200002): LDR SB, MT, MOD2 [Texts] |
00A0 | o(41D80005): ADD R1, SB, VAR5 |
00A1 | p .FIXUP D |
00A1 | p(8D000002): LDR SB, MT, MOD0 [PCLink1] |
00A2 | p(42D80038): ADD R2, SB, 38H [" done"] |
00A3 | p(43000006): MOV R3, R0, 6H |
00A4 | q .FIXUP P |
00A4 | q(F721D018): BL MOD2 [Texts] PROC29 |
00A5 | r .FIXUP D |
00A5 | r(8D000004): LDR SB, MT, MOD0 [PCLink1] |
00A6 | r(40D80004): ADD R0, SB, 4H [data] |
00A7 | r .FIXUP D |
00A7 | r(8D200002): LDR SB, MT, MOD2 [Texts] |
00A8 | r(41D80005): ADD R1, SB, VAR5 |
00A9 | s .FIXUP P |
00A9 | s(F721C005): BL MOD2 [Texts] PROC28 |
00AA | t .FIXUP D |
00AA | t(8D400003): LDR SB, MT, MOD4 [Oberon] |
00AB | t(80D0000D): LDR R0, SB, VAR13 |
00AC | u .FIXUP D |
00AC | u(8D000002): LDR SB, MT, MOD0 [PCLink1] |
00AD | u(81D00004): LDR R1, SB, 4H [data] |
| ELSEv Sendw(11H)x |
00AE | v .FIXUP P |
00AE | v(F720E005): BL MOD2 [Texts] PROC14 |
00AF | w(E7000002): B 2 [00B2H] |
00B0 | x(40000011): MOV R0, R0, 11H |
| ENDy |
00B1 | y(F7FFFF80): BL -128 [0032H] |
| ELSIF codez = REC THENa (*receive file*) |
00B2 | z(E7000078): B 120 [012BH] |
00B3 | a(90E00013): LDR R0, SP, 13H |
00B4 | a(40090021): SUB R0, R0, 21H |
00B5 | a(E9000070): BNE 112 [0126H] |
| LED(30H);b RecName(name)c;d F := Files.New(name)e;f |
00B6 | b(40000030): MOV R0, R0, 30H |
00B7 | b(5100FFC4): MOV R1, R0, FFFFFFC4H |
00B8 | b(A0100000): STR R0, R1, 0H |
00B9 | c(40E80014): ADD R0, SP, 14H |
00BA | c(41000020): MOV R1, R0, 20H |
00BB | d(F7FFFF52): BL -174 [000EH] |
00BC | e(40E80014): ADD R0, SP, 14H |
00BD | e(41000020): MOV R1, R0, 20H |
00BE | f .FIXUP P |
00BE | f(F7103010): BL MOD1 [Files] PROC3 |
00BF | f(A0E00034): STR R0, SP, 34H |
| IF F # NIL THENg |
00C0 | g(80E00034): LDR R0, SP, 34H |
00C1 | g(E1000061): BEQ 97 [0123H] |
| Texts.WriteString(W,h "receiving ")i;j Texts.WriteString(W,k name)l;m |
00C2 | h .FIXUP D |
00C2 | h(8D000016): LDR SB, MT, MOD0 [PCLink1] |
00C3 | h(40D80004): ADD R0, SB, 4H [data] |
00C4 | h .FIXUP D |
00C4 | h(8D200002): LDR SB, MT, MOD2 [Texts] |
00C5 | h(41D80005): ADD R1, SB, VAR5 |
00C6 | i .FIXUP D |
00C6 | i(8D000002): LDR SB, MT, MOD0 [PCLink1] |
00C7 | i(42D80040): ADD R2, SB, 40H ["receiving "] |
00C8 | i(4300000B): MOV R3, R0, BH |
00C9 | j .FIXUP P |
00C9 | j(F721D00B): BL MOD2 [Texts] PROC29 |
00CA | k .FIXUP D |
00CA | k(8D000004): LDR SB, MT, MOD0 [PCLink1] |
00CB | k(40D80004): ADD R0, SB, 4H [data] |
00CC | k .FIXUP D |
00CC | k(8D200002): LDR SB, MT, MOD2 [Texts] |
00CD | k(41D80005): ADD R1, SB, VAR5 |
00CE | l(42E80014): ADD R2, SP, 14H |
00CF | l(43000020): MOV R3, R0, 20H |
00D0 | m .FIXUP P |
00D0 | m(F721D007): BL MOD2 [Texts] PROC29 |
| Texts.Append(Oberon.Log,n W.buf)o;p |
00D1 | n .FIXUP D |
00D1 | n(8D400005): LDR SB, MT, MOD4 [Oberon] |
00D2 | n(80D0000D): LDR R0, SB, VAR13 |
00D3 | o .FIXUP D |
00D3 | o(8D000002): LDR SB, MT, MOD0 [PCLink1] |
00D4 | o(81D00004): LDR R1, SB, 4H [data] |
00D5 | p .FIXUP P |
00D5 | p(F720E005): BL MOD2 [Texts] PROC14 |
| Files.Set(R,q F,r 0)s;t Send(ACK)u;v |
00D6 | q(40E80038): ADD R0, SP, 38H |
00D7 | q .FIXUP D |
00D7 | q(8D100004): LDR SB, MT, MOD1 [Files] |
00D8 | q(41D80001): ADD R1, SB, VAR1 |
00D9 | r(82E00034): LDR R2, SP, 34H |
00DA | s(43000000): MOV R3, R0, 0H |
00DB | t .FIXUP P |
00DB | t(F710B006): BL MOD1 [Files] PROC11 |
00DC | u(40000010): MOV R0, R0, 10H |
00DD | v(F7FFFF54): BL -172 [0032H] |
| REPEAT Rec(x)w;x len := x;y i := 0;z |
00DE | w(40E80010): ADD R0, SP, 10H |
00DF | x(F7FFFF20): BL -224 [0000H] |
00E0 | y(90E00010): LDR R0, SP, 10H |
00E1 | y(A0E00004): STR R0, SP, 4H |
00E2 | z(40000000): MOV R0, R0, 0H |
00E3 | z(A0E0000C): STR R0, SP, CH |
| WHILE i < len DOa Rec(x)b;c buf[i]d := x;e INC(i) ENDf ; |
00E4 | a(80E0000C): LDR R0, SP, CH |
00E5 | a(81E00004): LDR R1, SP, 4H |
00E6 | a(00090001): SUB R0, R0, R1 |
00E7 | a(ED00000C): BGE 12 [00F4H] |
00E8 | b(40E80010): ADD R0, SP, 10H |
00E9 | c(F7FFFF16): BL -234 [0000H] |
00EA | d(80E0000C): LDR R0, SP, CH |
00EB | d(41090100): SUB R1, R0, 100H |
00EC | d(DA080C1C): BLCC MT [trap=1, pos=2060] |
00ED | d(00E80000): ADD R0, SP, R0 |
00EE | e(91E00010): LDR R1, SP, 10H |
00EF | e(B1000050): STR R1, R0, 50H |
00F0 | f(80E0000C): LDR R0, SP, CH |
00F1 | f(40080001): ADD R0, R0, 1H |
00F2 | f(A0E0000C): STR R0, SP, CH |
00F3 | f(E7FFFFF0): B -16 [00E4H] |
| i := 0;g |
00F4 | g(40000000): MOV R0, R0, 0H |
00F5 | g(A0E0000C): STR R0, SP, CH |
| WHILE i < len DOh Files.WriteByte(R,i buf[i]j)k;l INC(i) ENDm ; |
00F6 | h(80E0000C): LDR R0, SP, CH |
00F7 | h(81E00004): LDR R1, SP, 4H |
00F8 | h(00090001): SUB R0, R0, R1 |
00F9 | h(ED00000D): BGE 13 [0107H] |
00FA | i(40E80038): ADD R0, SP, 38H |
00FB | i .FIXUP D |
00FB | i(8D100024): LDR SB, MT, MOD1 [Files] |
00FC | i(41D80001): ADD R1, SB, VAR1 |
00FD | j(82E0000C): LDR R2, SP, CH |
00FE | j(43290100): SUB R3, R2, 100H |
00FF | j(DA086E1C): BLCC MT [trap=1, pos=2158] |
0100 | j(02E80002): ADD R2, SP, R2 |
0101 | k(92200050): LDR R2, R2, 50H |
0102 | l .FIXUP P |
0102 | l(F7116027): BL MOD1 [Files] PROC22 |
0103 | m(80E0000C): LDR R0, SP, CH |
0104 | m(40080001): ADD R0, R0, 1H |
0105 | m(A0E0000C): STR R0, SP, CH |
0106 | m(E7FFFFEF): B -17 [00F6H] |
| Send(ACK)n |
0107 | n(40000010): MOV R0, R0, 10H |
| UNTILo len < 255;p |
0108 | o(F7FFFF29): BL -215 [0032H] |
0109 | p(80E00004): LDR R0, SP, 4H |
010A | p(400900FF): SUB R0, R0, FFH |
010B | p(EDFFFFD2): BGE -46 [00DEH] |
| Files.Register(F)q;r Send(ACK)s;t |
010C | q(80E00034): LDR R0, SP, 34H |
010D | r .FIXUP P |
010D | r(F710400B): BL MOD1 [Files] PROC4 |
010E | s(40000010): MOV R0, R0, 10H |
010F | t(F7FFFF22): BL -222 [0032H] |
| Texts.WriteString(W,u " done")v;w Texts.WriteLn(W)x;y Texts.Append(Oberon.Log,z W.buf)a |
0110 | u .FIXUP D |
0110 | u(8D000015): LDR SB, MT, MOD0 [PCLink1] |
0111 | u(40D80004): ADD R0, SB, 4H [data] |
0112 | u .FIXUP D |
0112 | u(8D200002): LDR SB, MT, MOD2 [Texts] |
0113 | u(41D80005): ADD R1, SB, VAR5 |
0114 | v .FIXUP D |
0114 | v(8D000002): LDR SB, MT, MOD0 [PCLink1] |
0115 | v(42D8004C): ADD R2, SB, 4CH [" done"] |
0116 | v(43000006): MOV R3, R0, 6H |
0117 | w .FIXUP P |
0117 | w(F721D00A): BL MOD2 [Texts] PROC29 |
0118 | x .FIXUP D |
0118 | x(8D000004): LDR SB, MT, MOD0 [PCLink1] |
0119 | x(40D80004): ADD R0, SB, 4H [data] |
011A | x .FIXUP D |
011A | x(8D200002): LDR SB, MT, MOD2 [Texts] |
011B | x(41D80005): ADD R1, SB, VAR5 |
011C | y .FIXUP P |
011C | y(F721C005): BL MOD2 [Texts] PROC28 |
011D | z .FIXUP D |
011D | z(8D400003): LDR SB, MT, MOD4 [Oberon] |
011E | z(80D0000D): LDR R0, SB, VAR13 |
011F | a .FIXUP D |
011F | a(8D000002): LDR SB, MT, MOD0 [PCLink1] |
0120 | a(81D00004): LDR R1, SB, 4H [data] |
| ELSEb Sendc(NAK)d |
0121 | b .FIXUP P |
0121 | b(F720E005): BL MOD2 [Texts] PROC14 |
0122 | c(E7000002): B 2 [0125H] |
0123 | d(40000011): MOV R0, R0, 11H |
| ENDe |
0124 | e(F7FFFF0D): BL -243 [0032H] |
| ELSIF codef = REQ THENg Send(ACK)h |
0125 | f(E7000005): B 5 [012BH] |
0126 | g(90E00013): LDR R0, SP, 13H |
0127 | g(40090020): SUB R0, R0, 20H |
0128 | g(E9000002): BNE 2 [012BH] |
0129 | h(40000010): MOV R0, R0, 10H |
| ENDi ; |
012A | i(F7FFFF07): BL -249 [0032H] |
| LED(0) |
| ENDj |
012B | j(40000000): MOV R0, R0, 0H |
012C | j(5100FFC4): MOV R1, R0, FFFFFFC4H |
012D | j(A0100000): STR R0, R1, 0H |
| ENDk Task; |
012E | k(8FE00000): LDR LNK, SP, 0H |
012F | k(4EE80150): ADD SP, SP, 150H |
0130 | k(C700000F): B LNK |
| |
| PROCEDURE Run*; |
| BEGINl Oberon.Install(T)m;n Texts.WriteString(W,o "PCLink started")p;q |
0131 | l .PROC 1 |
0131 | l .COMMAND Run |
0131 | l(4EE90004): SUB SP, SP, 4H |
0132 | l(AFE00000): STR LNK, SP, 0H |
0133 | m .FIXUP D |
0133 | m(8D000014): LDR SB, MT, MOD0 [PCLink1] |
0134 | m(80D00000): LDR R0, SB, 0H [data] |
0135 | n .FIXUP P |
0135 | n(F742B014): BL MOD4 [Oberon] PROC43 |
0136 | o .FIXUP D |
0136 | o(8D000003): LDR SB, MT, MOD0 [PCLink1] |
0137 | o(40D80004): ADD R0, SB, 4H [data] |
0138 | o .FIXUP D |
0138 | o(8D200002): LDR SB, MT, MOD2 [Texts] |
0139 | o(41D80005): ADD R1, SB, VAR5 |
013A | p .FIXUP D |
013A | p(8D000002): LDR SB, MT, MOD0 [PCLink1] |
013B | p(42D80054): ADD R2, SB, 54H ["PCLink started"] |
013C | p(4300000F): MOV R3, R0, FH |
013D | q .FIXUP P |
013D | q(F721D008): BL MOD2 [Texts] PROC29 |
| Texts.WriteLn(W)r;s Texts.Append(Oberon.Log,t W.buf)u |
013E | r .FIXUP D |
013E | r(8D000004): LDR SB, MT, MOD0 [PCLink1] |
013F | r(40D80004): ADD R0, SB, 4H [data] |
0140 | r .FIXUP D |
0140 | r(8D200002): LDR SB, MT, MOD2 [Texts] |
0141 | r(41D80005): ADD R1, SB, VAR5 |
0142 | s .FIXUP P |
0142 | s(F721C005): BL MOD2 [Texts] PROC28 |
0143 | t .FIXUP D |
0143 | t(8D400003): LDR SB, MT, MOD4 [Oberon] |
0144 | t(80D0000D): LDR R0, SB, VAR13 |
0145 | u .FIXUP D |
0145 | u(8D000002): LDR SB, MT, MOD0 [PCLink1] |
0146 | u(81D00004): LDR R1, SB, 4H [data] |
| ENDv Run; |
0147 | v .FIXUP P |
0147 | v(F720E005): BL MOD2 [Texts] PROC14 |
0148 | v(8FE00000): LDR LNK, SP, 0H |
0149 | v(4EE80004): ADD SP, SP, 4H |
014A | v(C700000F): B LNK |
| |
| PROCEDURE Stop*; |
| BEGINw Oberon.Remove(T)x;y Texts.WriteString(W,z "PCLink stopped")a;b |
014B | w .PROC 2 |
014B | w .COMMAND Stop |
014B | w(4EE90004): SUB SP, SP, 4H |
014C | w(AFE00000): STR LNK, SP, 0H |
014D | x .FIXUP D |
014D | x(8D000008): LDR SB, MT, MOD0 [PCLink1] |
014E | x(80D00000): LDR R0, SB, 0H [data] |
014F | y .FIXUP P |
014F | y(F742C008): BL MOD4 [Oberon] PROC44 |
0150 | z .FIXUP D |
0150 | z(8D000003): LDR SB, MT, MOD0 [PCLink1] |
0151 | z(40D80004): ADD R0, SB, 4H [data] |
0152 | z .FIXUP D |
0152 | z(8D200002): LDR SB, MT, MOD2 [Texts] |
0153 | z(41D80005): ADD R1, SB, VAR5 |
0154 | a .FIXUP D |
0154 | a(8D000002): LDR SB, MT, MOD0 [PCLink1] |
0155 | a(42D80064): ADD R2, SB, 64H ["PCLink stopped"] |
0156 | a(4300000F): MOV R3, R0, FH |
0157 | b .FIXUP P |
0157 | b(F721D008): BL MOD2 [Texts] PROC29 |
| Texts.WriteLn(W)c;d Texts.Append(Oberon.Log,e W.buf)f |
0158 | c .FIXUP D |
0158 | c(8D000004): LDR SB, MT, MOD0 [PCLink1] |
0159 | c(40D80004): ADD R0, SB, 4H [data] |
015A | c .FIXUP D |
015A | c(8D200002): LDR SB, MT, MOD2 [Texts] |
015B | c(41D80005): ADD R1, SB, VAR5 |
015C | d .FIXUP P |
015C | d(F721C005): BL MOD2 [Texts] PROC28 |
015D | e .FIXUP D |
015D | e(8D400003): LDR SB, MT, MOD4 [Oberon] |
015E | e(80D0000D): LDR R0, SB, VAR13 |
015F | f .FIXUP D |
015F | f(8D000002): LDR SB, MT, MOD0 [PCLink1] |
0160 | f(81D00004): LDR R1, SB, 4H [data] |
| ENDg Stop; |
0161 | g .FIXUP P |
0161 | g(F720E005): BL MOD2 [Texts] PROC14 |
0162 | g(8FE00000): LDR LNK, SP, 0H |
0163 | g(4EE80004): ADD SP, SP, 4H |
0164 | g(C700000F): B LNK |
| |
| BEGINh Texts.OpenWriter(W)i;j T := Oberon.NewTask(Task,k 0)l |
0165 | h .PROC 0 |
0165 | h .ENTRYPOINT |
0165 | h(4EE90004): SUB SP, SP, 4H |
0166 | h(AFE00000): STR LNK, SP, 0H |
0167 | i .FIXUP D |
0167 | i(8D000008): LDR SB, MT, MOD0 [PCLink1] |
0168 | i(40D80004): ADD R0, SB, 4H [data] |
0169 | i .FIXUP D |
0169 | i(8D200002): LDR SB, MT, MOD2 [Texts] |
016A | i(41D80005): ADD R1, SB, VAR5 |
016B | j .FIXUP P |
016B | j(F721700A): BL MOD2 [Texts] PROC23 |
016C | k(F7000000): BL 0 [016DH] |
016D | k(40F904B8): SUB R0, LNK, 4B8H |
016E | l(41000000): MOV R1, R0, 0H |
| ENDm PCLink1.n |
016F | m .FIXUP P |
016F | m(F742A004): BL MOD4 [Oberon] PROC42 |
0170 | m .FIXUP D |
0170 | m(8D000007): LDR SB, MT, MOD0 [PCLink1] |
0171 | m(A0D00000): STR R0, SB, 0H [data] |
0172 | n(8FE00000): LDR LNK, SP, 0H |
0173 | n(4EE80004): ADD SP, SP, 4H |
0174 | n(C700000F): B LNK |