annotate level2/modules/pipeman.asm @ 1099:b77631456f91

Change to makefile
author roug
date Wed, 09 Apr 2003 19:02:19 +0000
parents 0be75b09d8c2
children f7e46ac34ab6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
746
b2d917ea47fc Fixed ttl to reflect OS-9 Level Two usage
boisy
parents: 734
diff changeset
2 * PipeMan - OS-9 Level Two Pipe File Manager
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
3 *
941
0be75b09d8c2 Slight source touchup
boisy
parents: 746
diff changeset
4 * $Id$
0be75b09d8c2 Slight source touchup
boisy
parents: 746
diff changeset
5 *
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
6 *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
7 * 'show grf.3.a | eat' (eat is cat, but just does a I$ReadLn, and not I$WritLn)
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
8 * April 10, 1996 14:05:15
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
9 * April 10, 1996 14:07:47
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
10 * 15.2 seconds per iteration
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
11 * i.e. everything but the screen writes
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
12 *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
13 * fast SCF+fast pipe
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
14 * 'show grf.3.a | cat', 10 times
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
15 * April 10, 1996 13:17:54
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
16 * April 10, 1996 13:21:57
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
17 * 24.3 seconds per iteration
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
18 * 9.1 solely for pipes
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
19 *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
20 * fast SCF+old slow pipe
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
21 * April 10, 1996 13:30:24
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
22 * April 10, 1996 13:38:04
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
23 * 46.0 seconds per iteration
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
24 * 30.8 solely for pipes
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
25 *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
26 * speedup percent is (30.8-9.1)/30.8 = 70%
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
27 *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
28 * Pipes are more than doubled in speed!
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
29 *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
30 * 32 byte read and write buffers
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 * ------------------------------------------------------------------
941
0be75b09d8c2 Slight source touchup
boisy
parents: 746
diff changeset
34 * 4 Enhanced and re-written ADK ??/??/??
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 nam PipeMan
746
b2d917ea47fc Fixed ttl to reflect OS-9 Level Two usage
boisy
parents: 734
diff changeset
37 ttl OS-9 Level Two Pipe File Manager
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
39 ifp1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 use defsfile
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
41 endc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
43 tylg set FlMgr+Objct
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
44 atrv set ReEnt+Rev
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
45 rev set $03
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 edition set 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
48 mod eom,name,tylg,atrv,start,size
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
49
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
50 rmb $0000
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
51 SIZE equ .
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
53 org PD.FST
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
54 PD.READ rmb 4
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
55 PD.WRITE rmb 4
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
56 PD.END rmb 2 end of the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
57 PD.WPTR rmb 2 write pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
58 PD.RPTR rmb 2 read pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
59 PD.BLOCK rmb 1 0=block reads, 1=OK to read block flag
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
60
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
61 org $0000
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
62 P.CPR rmb 1 process ID
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
63 P.CNT rmb 1 count
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
64 P.SIG rmb 1 signal code
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
65 P.FLAG rmb 1 raw/edit flag
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
66
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
67 name fcs /PipeMan/
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
70 start lbra Create
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
71 lbra Open
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
72 lbra MakDir
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
73 lbra ChgDir
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
74 lbra Delete
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
75 Seek clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
76 rts
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
77 nop
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
78 lbra Read
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
79 lbra Write
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
80 lbra ReadLn
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
81 lbra WritLn
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
82 GetStt clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
83 rts
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
84 nop
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
85 SetStt clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
86 rts
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
87 nop
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
88 Close lda PD.CNT,y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
89 bne L008E
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
90 LDU PD.BUF,y if no one's using it,
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
91 clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
92 inca
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
93 os9 F$SRtMem return the memory
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
94 clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
95 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
97 L008E leax PD.READ,y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
98 cmpa PD.READ+P.CNT,y is the read count zero?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
99 Beq L009C
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
100
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
101 cmpa PD.WRITE+P.CNT,y is the write count zero?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
102 bne L00A9
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
103 leax PD.WRITE,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
105 L009C lda P.CPR,x get process ID that's reading/writing
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
106 beq L00A9 if none
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
107 ldb P.SIG,x get signal code
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
108 beq L00A9
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
109 clr P.SIG,x
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
110 os9 F$Send send a wake-up signal to the process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
111 L00A9 clrb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
114 MakDir equ *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
115 ChgDir equ *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
116 Delete equ *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
117 comb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
118 ldb #E$UnkSVC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
121 Create equ *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
122 Open equ *
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
123 ldx R$X,u get address of filename to open
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
124 pshs y save PD pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
125 os9 F$PrsNam parse /pipe
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
126 bcs L007B exit on error
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
127 ldx <D.Proc current process ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
128 ldb P$Task,x get task number for call, below
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
129 leax -$01,y back up one character
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
130 os9 F$LDABX get last character of the filename
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
131 tsta check the character
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
132 bmi L0060 if high bit set, it's OK
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
133 leax ,y point to next bit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
134 os9 F$PrsNam else parse name
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
135 bcc L007B if no error, it's a sub-dir, and we error out
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
136 L0060 sty R$X,u save new pathname ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
137 puls y restore PD pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
138 ldd #$0100
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
139 os9 F$SRqMem request one page for the pipe
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
140 bcs L007A exit on error
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
141 stu PD.BUF,Y save ptr to the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
142 stu <PD.WPTR,Y save write pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
143 stu <PD.RPTR,Y and read pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
144 leau d,u point to the end of the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
145 stu <PD.END,Y save save the ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
146 L007A rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
148 L007B comb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
149 ldb #E$BPNam bad path name
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
150 puls pc,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
152 ReadLn ldb #$0D
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
153 fcb $21 skip one byte
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
155 Read clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
156 stb PD.READ+P.FLAG,Y raw read
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
157 leax PD.READ,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
158 lbsr L0160 send wakeup signals to process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
159 bcs L0100 on error, wake up writing process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
160 ldx R$Y,U
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
161 beq L0100 if no bytes to rwad
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
162 ldd R$X,U start address to read from
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
163 leax d,x add in number of bytes: end address
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
164
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
165 * NOTE: PD.RGS,Y will change as the processes read/write the pipe,
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
166 * and sleep.
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
167 pshs u save current caller's register stack
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
168 leas -32,s reserve a 32-byte buffer on the stack
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
169 leau ,s point to the start of the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
170 pshs d,x save start, end to read
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
172 clrb no bytes read to user yet
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
173 puls x restore number of data bytes read, read address
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
174 L00DB bsr L01F2 are we blocked?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
175 bcs L00C8 yes, send a signal
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
176 sta b,u store the byte in the internal read buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
177 leax $01,X go up by one byte
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
178 incb one more byte in the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
179 cmpb #32 reached maximum size of the buffer?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
180 blo L00E0 no, continue
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
181 bsr read.out read 32 bytes of data to the caller
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
183 L00E0 tst PD.READ+P.FLAG,Y was it a raw read?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
184 beq L00ED skip ahead if raw
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
185 cmpa #C$CR was the character a CR?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
186 beq L00F1 yes, we're done: flush and exit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
187 L00ED cmpx ,S or at end of data to read?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
188 blo L00DB no, keep reading
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
190 L00F1 bsr read.out flush the rest of the pipe buffer to the user
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
191 L00F2 tfr X,D this is how far we got
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
192 subd ,S++ take out start of buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
193 leas 32,s kill our on-stack buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
194 puls u restore caller's register stack ptr: NOT PD.RGS,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
195 addd R$Y,U add in number of bytes
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
196 std R$Y,U save bytes read
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
197 bne L00FF if not zero
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
198 ldb #E$EOF zero bytes read:EOF error
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
199 fcb $21 skip one byte
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
200
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
201 L00FF clrb no errors
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
202 L0100 leax PD.READ,Y read data ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
203 lbra L01BD signal other it's OK to go ahead
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
204
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
205 read.out pshs a,x,y,u save registers
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
206 tstb any data to write?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
207 beq read.ex no, skip ahead
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
208 clra make 16-bit data length
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
209 tfr d,y number of data bytes to read to user
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
210 negb make it negative
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
211 leax b,x back up TO pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
212 pshs x save it
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
213 leax ,u point to the start of the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
214 ldu <D.Proc current process pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
215 ldb P$Task,u A=$00 from above, already
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
216 puls u restore TO pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
217
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
218 os9 F$Move move the data over
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
219 clrb no bytes read to the caller yet
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
220 read.ex puls a,x,y,u,pc restore registers and exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
222 L00C8 pshs x save read pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
223 bsr read.out dump data out to the user
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
224 pshs b save number of bytes read
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
225 leax PD.READ,Y read data area ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
226 lbsr L018B setup for signal
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
227 puls x,b restore registers: note B=$00, but we CANNOT do a
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
228 bcc L00DB clrb, because this line needs CC.C!
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
229 bra L00F2 don't write data out again, but exit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
230
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
231 * Check if we're blocked
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
232 L01F2 lda <PD.BLOCK,Y we blocked?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
233 bne L01F9 no, skip ahead
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
234 coma set flag: blocked
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
235 rts and return to the caller
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
237 L01F9 pshs x save read ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
238 ldx <PD.RPTR,Y where to read from in the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
239 lda ,X+ get a byte
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
240 cmpx <PD.END,Y at the end of the buffer?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
241 blo L0207 no, skip ahesd
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
242 ldx PD.BUF,Y yes, go to start
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
243 L0207 stx <PD.RPTR,Y save new read ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
244 cmpx <PD.WPTR,Y caught up to the write pointer yet?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
245 bne L0212 no, skeip ahead
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
246 clr <PD.BLOCK,Y yes, set read is blocked
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
247 L0212 andcc #^Carry no errors
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
248 puls pc,x restore regs and exit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
249
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
250 L0160 lda P.CPR,X get current process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
251 beq L0185 none, exit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
252 cmpa PD.CPR,Y current process ID
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
253 beq L0189 none, exit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
254 inc P.CNT,X one more process using this pipe
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
255 ldb P.CNT,X
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
256 cmpb PD.CNT,Y same as the number for this path?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
257 bne L0173 no, skip ahead
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
258 lbsr L009C no, send a wake-up signal
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
259 L0173 os9 F$IOQu and insert it in the others IO queue
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
260 dec P.CNT,X decrement count
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
261 pshs x
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
262 ldx <D.Proc current process ptr
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
263 ldb <P$Signal,X signal code
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
264 puls x
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
265 beq L0160 if no signal code sent, do another process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
266 coma otherwise return CC.C set, and B=signal code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
269 L0185 ldb PD.CPR,Y grab current PD process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
270 stb P.CPR,X save as current reading/writing process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
271 L0189 clrb no errors
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
272 rts and exit
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
273
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
274 L01CC pshs b,x save regs
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
275 ldx <PD.WPTR,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
276 ldb <PD.BLOCK,Y 0=READ, 1=WRITE
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
277 beq L01DE was reading, set to write and continue
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
278 cmpx <PD.RPTR,Y caught up to the read pointer yet?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
279 bne L01E3
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
280 comb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
281 puls pc,x,b
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
282
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
283 L01DE inc <PD.BLOCK,Y set to writing into the pipe
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
284 L01E3 sta ,X+ save the byte
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
285 cmpx <PD.END,Y if at the end of the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
286 blo L01EC
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
287 ldx PD.BUF,Y reset to the beginning
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
288 L01EC stx <PD.WPTR,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
289 clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
290 puls pc,x,b
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
291
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
292 write.in pshs a,x,y save registers
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
293 leau -32,u point to the start of the buffer again
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
294 ldx <D.Proc current process pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
295 lda P$Task,x get FROM task number for this process
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
296 ldx 1,s get FROM pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
297 ldy #32 16 bytes to grab
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
298 clrb TO the system task
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
299 os9 F$Move
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
300 ldb #32 16 bytes in the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
301 puls a,x,y,pc
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
302
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
303 WritLn ldb #$0D
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
304 fcb $21 skip one byte
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
305
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
306 Write clrb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
307 stb <PD.WRITE+P.FLAG,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
308 leax PD.WRITE,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
309 bsr L0160 make sure it's OK
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
310 bcs L015C
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
311 ldx R$Y,U get number of bytes to write
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
312 beq L015C
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
313 ldd R$X,U start address
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
314 leax d,x add in number of bytes
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
315 pshs u
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
316 leau ,s point to the end of the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
317 leas -32,s
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
318 pshs d,x save start, end
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
319
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
320 ldx ,s get initial start pointer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
321 bsr write.in fill the write buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
322
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
323 puls x
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
324 L0137 lda ,u
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
325 bsr L01CC save it in the buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
326 bcs L0124 caught up to reading process yet?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
327 leax $01,X up by one byte
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
328 leau 1,u
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
329 decb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
330 bne L0138
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
331 bsr write.in fill the buffer again
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
332
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
333 L0138 tst <PD.WRITE+P.FLAG,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
334 beq L014B
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
335 cmpa #C$CR at the end of a line to output?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
336 beq L014F
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
337 L014B cmpx ,S at end yet?
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
338 blo L0137 if not, read more data
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
339 L014F clrb clear carry and error
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
340 L0150 ldu 2+32,s skip END, 32-byte write buffer, get U
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
341 pshs b,cc
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
342 tfr X,D
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
343 subd $02,S take out end address
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
344 addd R$Y,U add in number of bytes
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
345 std R$Y,U save bytes written
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
346 puls x,b,cc
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
347 leas 32,s kill write buffer
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
348 puls u
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
349
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
350 L015C leax PD.WRITE,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
351 * can probably lose saving 'U' in next few lines... but only minor difference
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
352 * Signal read/write it's OK to go ahead
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
353 L01BD pshs u,b,cc
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
354 clr P.CPR,X NO process currently using this device
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
355 bsr Other signal other process to start
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
356 puls pc,u,b,cc
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
357
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
358 L0124 pshs x,b
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
359 leax PD.WRITE,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
360 bsr L018B send signal to other
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
361 tfr b,a save error code, if applicable
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
362 puls x,b restore pointer, byte count
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
363 bcc L0137 continue if OK
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
364 tfr a,b otherwise restore error code
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
365 bra L0150 exit, returning the error code to the user
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
366
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
367 L018B ldb P.CNT,X
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
368 incb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
369 cmpb PD.CNT,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
370 beq L01B9
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
371 stb P.CNT,X
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
372 ldb #$01
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
373 stb P.SIG,X
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
374 clr PD.CPR,Y
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
375 pshs x
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
376 bsr Other
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
377 ldx #$0000 make X=0
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
378 os9 F$Sleep sleep forever
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
379 ldx <D.Proc
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
380 ldb <P$Signal,X get signal code
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
381 puls x
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
382 dec P.CNT,X
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
383 tstb
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
384 bne L01BB if a signal, we can't wake up
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
385 clrb the writing process
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
388 L01B9 ldb #E$Write write error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 L01BB coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
392 Other exg X,D
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
393 eorb #$04 if r/w go to w/r
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
394 exg D,X
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
395 lbra L009C
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
397 emod
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 eom equ *
734
1cf59b6e12df Brought over from NitrOS-9
boisy
parents: 0
diff changeset
399 end