annotate level1/modules/printer.asm @ 1570:a4b6825eeb72

ccdisk renamed to rb1773, added CC3 driver into source
author boisy
date Tue, 18 May 2004 01:26:19 +0000
parents 53c50c807d55
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
2 * Printer - CoCo Serial Printer Driver
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
6 * Enhanced and re-written by Alan DeKok
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
7 *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
8 * Problems with original:
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
9 * returns wrong error on Read/SetStt
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
10 * doesn't block output. The printer is a single-user device!
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
11 *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
12 * Edt/Rev YYYY/MM/DD Modified by
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
13 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 * ------------------------------------------------------------------
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
15 * 13 2003/01/05 Boisy G. Pitre
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
16 * Back-ported to OS-9 Level Two.
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
17 *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
18 * 2003/09/04 Boisy G. Pitre
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
19 * Back-ported to OS-9 Level One.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
21 nam Printer
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
22 ttl CoCo Serial Printer Driver
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
28 tylg set Drivr+Objct
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
29 atrv set ReEnt+Rev
1287
10957d54bf16 Made all modules rev 0
boisy
parents: 1213
diff changeset
30 rev set $00
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
31 edition set 13
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
32
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
33 mod eom,name,tylg,atrv,Start,Size
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
35 fcb READ.+WRITE.
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
36
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
37 name fcs /Printer/
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
38 fcb edition one more revision level than the stock printer
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
40 * Device memory area: offset from U
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
41 org V.SCF V.SCF: free memory for driver to use
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
42 V.PAR rmb 1 1=space, 2=mark parity
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
43 V.BIT rmb 1 0=7, 1=8 bits
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
44 V.STP rmb 1 0=1 stop bit, 1=2 stop bits
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
45 V.COM rmb 2 Com Status baud/parity (=Y from SS.Comst Set/GetStt
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
46 V.COL rmb 1 columns
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
47 V.ROW rmb 1 rows
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
48 V.WAIT rmb 2 wait count for baud rate?
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
49 V.TRY rmb 2 number of re-tries if printer is busy
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
50 V.RTRY rmb 1 low nibble of parity=high byte of number of retries
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
51 V.BUFF rmb $80 room for 128 blocked processes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 size equ .
256
9e9648e17298 Additional source improvements
boisy
parents: 201
diff changeset
53
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
54 * Baud Rate Delay Table
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
55 BaudDly equ *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
56 IFEQ Level-1
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
57 * OS-9 Level One delay values (0.89MHz)
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
58 fdb $0482 110 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
59 fdb $01A2 300 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
60 fdb $00CD 600 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
61 fdb $0063 1200 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
62 fdb $002D 2400 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
63 fdb $0013 4800 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
64 fdb $0005 9600 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
65 ELSE
1363
53c50c807d55 Major move to new NitrOS-9 project
boisy
parents: 1320
diff changeset
66 IFEQ H6309
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
67 * OS-9 Level Two delay values (1.78MHz)
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
68 fdb $090C 110 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
69 fdb $034C 300 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
70 fdb $01A2 600 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
71 fdb $00CE 1200 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
72 fdb $0062 2400 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
73 fdb $002E 4800 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
74 fdb $0012 9600 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
75 fdb $0003 32000 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
76 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
77 * NitrOS-9 Level Two delay values (1.78MHz)
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
78 fdb $090C 110 baud (Unchanged, unknown)
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
79 fdb $03D0 300 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
80 fdb $01A2 600 baud (Unchanged, unknown)
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
81 fdb $00F0 1200 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
82 fdb $0073 2400 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
83 fdb $0036 4800 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
84 fdb $0017 9600 baud
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
85 fdb $0003 32000 baud (Unchanged, unknown)
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
86 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
87 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
90 start equ *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
91 lbra Init
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 lbra Write
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
94 lbra GetStt
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
95 lbra SetStt
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
96
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
97 * Term
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
98 *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
99 * Entry:
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
100 * U = address of device memory area
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
101 *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
102 * Exit:
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
103 * CC = carry set on error
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
104 * B = error code
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
105 *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
106 Term equ *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
107 clrb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
108 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 * Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 * Y = address of device descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 *
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
120 Init orcc #IntMasks
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 257
diff changeset
121 ldx #PIA1Base
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 clr $01,x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
123 ldd <IT.COL,y get number of columns/rows
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
124 std <V.COL,u save it in statics
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 lda #$FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 lda #$36
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 lda ,x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
130 andcc #^IntMasks
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
131 ldd <IT.PAR,y parity and baud rate
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
132 lbsr L0138 setup parity/baud in device memory
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
133 lbsr L0104 get low bit of $FF22 into carry
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
134 lbcs L0100 it's the ready flag
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
135 * clear out buffer
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
136 leax V.BUFF,u room for 128 blocked processes
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
137 ldb #128
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
138 I010 clr ,x+ we're more concerned with room
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
139 decb than with speed, so we don't use TFM
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
140 bne I010
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
141 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
143 L005F ldb <PD.BAU,y get baud rate in path desc.
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
144 andb #$0F keep lower nibble
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
145 cmpb #$07 compare against highest
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
146 lbhs Read
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
147 aslb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
148 leax <BaudDly,pc table of delay times
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
149 ldx b,x get delay counter
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
150 stx <V.WAIT,u save it off
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
151 clrb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 rts
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
153
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
154 Bit_2 ldb #$02
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 257
diff changeset
155 L007D stb >PIA1Base
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
156 L0080 pshs d
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
157 ldd <V.WAIT,u get wait count for baud rate
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
158 L0085 equ *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
159 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
160 decd count down by one
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
161 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
162 subd #$0001
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
163 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 bne L0085
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
165 puls pc,d
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 * Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 * A = character to write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 *
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
178 Write equ *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
179 leax V.BUFF,u point to the buffer
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
180 ldb V.BUSY,u get my process number
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
181 tst ,x get allowed process number
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
182 bne W010 if not zero, else
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
183 stb ,x I'm the only one allowed to use it
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
184
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
185 W010 cmpb ,x am I allowed to use /p?
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
186 beq W030 if yes, go write a character
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
187
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
188 ***************************************************************
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
189 * WARNING: If more than 128 processes try to use the printer,
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
190 * this will CRASH BADLY. Since Level II on the Coco is limited
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
191 * to 32 processes, I don't think it's a problem.
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
192 ***************************************************************
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
193
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
194 W020 tst ,x+ if not, find the first non-zero entry
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
195 bne W020
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
196 stb -1,x and save my process number at the first zero
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
197 pshs a
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
198 lda V.BUFF,u process that's allowed to use /p
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
199 sta V.BUSY,u make it the busy one
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
200 ldb #S$Wake wake it up
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
201 os9 F$Send send a signal to wake it
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
202 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
203 tfr 0,x
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
204 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
205 ldx #$0000
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
206 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
207 os9 F$Sleep and go to sleep forever
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
208 puls a restore character to be sent, and continue
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
209
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
210 W030 bsr L005F set up baud rate, etc in memory
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
211 bcs L00CA
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
212 pshs a
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
213 bsr L00CB make sure that the device is ready
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
214 puls a
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
215 bcs L00CA if the device is not ready
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
216 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
217 lde #$09 9 bits to send out
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
218 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
219 pshs b,a
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
220 lda #$09
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
221 sta 1,s
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
222 puls a
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
223 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
224 orcc #IntMasks turn off interrupts
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
225 tst <V.BIT,u number of bits
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
226 beq L00AC if 7 bits, count down by one
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
227 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
228 dece initially send out start bit
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
229 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
230 dec ,s
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
231 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
232
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
233 L00AC bsr L007D write B to $FF20 and wait
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 clrb
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
235 lsra move A into carry
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
236 rolb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
237 rolb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
238 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
239 dece count down on the number of bits to send
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
240 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
241 dec ,s
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
242 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
243 bne L00AC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
244 IFEQ H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
245 puls b
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
246 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
247 ldb <V.PAR,u space/mark parity
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
248 beq L00BC 0=no parity
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
249 andb #$FE 1=space, 0=mark parity
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
250 * should be andb #$FD I think...
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
251 bsr L007D dump out parity
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
252 L00BC bsr Bit_2 and a stop bit
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
253 tst <V.STP,u do another one?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 beq L00C9
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
255 bsr Bit_2 yes, dump out another stop bit
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
256 L00C9 andcc #^IntMasks
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
257 L00CA rts
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
258
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
259 L0104 pshs b
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
260 ldb >PIA1Base+$02 get a byte
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
261 lsrb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
262 puls pc,b
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
263
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
264 L00CB equ *
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
265 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
266 clrd
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
267 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
268 clra
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 clrb
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
270 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
271 std <V.TRY,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 L00D0 ldd #$0303
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
273 L00D3 bsr L0104 get device ready status
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
274 bcs L00DE if not ready, wait for a bit
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
275 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
276 bsr L0080 wait
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
277 ELSE
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
278 lbsr L0080 wait
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
279 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
280 decb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
281 bne L00D3 try again
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
282 clrb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
283 rts
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
284
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
285 L00DE lbsr L0080 wait for a while
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
286 deca try 3 times,
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 bne L00D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 ldx #$0001
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
290 os9 F$Sleep sleep for the rest of this tick
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 puls x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
292 ldd <V.TRY,u
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
293 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
294 incd we've tried once more and failed...
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
295 ELSE
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 addd #$0001
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
297 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
298 std <V.TRY,u
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
299 ldb <V.RTRY,u number of retries to do
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
300 beq L00D0 if unspecified, keep retrying
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
301 cmpb <V.TRY,u if exceeded number of retries,
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
302 bhi L00D0 then we crap out
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
303
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
304 L0100 comb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 ldb #E$NotRdy
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
306 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 * GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 * CC = carry set on error
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
317 * B = error code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 *
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
319 GetStt cmpa #SS.EOF end of file?
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
320 bne L0112
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
321 clrb if so, exit with no error
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
322 rts
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
323
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
324 L0112 ldx PD.RGS,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 cmpa #SS.ScSiz
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
326 beq L0123
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 cmpa #SS.ComSt
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
328 bne L0173
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
329 ldd <V.COM,u get Com status
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 std R$Y,x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
331 clrb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
332 rts
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
333
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
334 * get screen size GetStt
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
335 L0123 clra
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
336 ldb <V.COL,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 std R$X,x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
338 ldb <V.ROW,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 std R$Y,x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
340 clrb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
341 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
343 * SetStat
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 * CC = carry set on error
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
352 * B = error code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 *
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
354 SetStt cmpa #SS.ComSt
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
355 bne Close if not, check if it's a close
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 ldd R$Y,x
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
358 * A = Parity byte
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
359 * B = baud rate
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
360 L0138 std <V.COM,u save parity, baud rate in com status
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
361 IFNE H6309
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
362 clrd
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
363 ELSE
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 clrb
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
366 ENDC
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
367 std <V.PAR,u
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
368 sta <V.STP,u
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
369 ldd <V.COM,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 tstb
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
371 bpl L014C
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
372 inc <V.STP,u do 2 stop bits
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
373 L014C bitb #$40 make sure the bit is zero
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 bne Read
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
375 bitb #$20 0=8, 1=7 bits
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
376 beq L0157
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
377 inc <V.BIT,u
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
378 L0157 bita #$20
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
379 beq L0169 if=0, no parity
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 bita #$80
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
381 beq Read if high bit set (only for ACIA devices), error out
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
382 inc <V.PAR,u parity
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 bita #$40
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
384 bne L0169 1=space,
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
385 inc <V.PAR,u 2=mark parity
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
386 L0169 anda #$0F
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
387 sta <V.RTRY,u
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
388 rts
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
389
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
390 Read comb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
391 ldb #E$BMode
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
394 L0173 comb
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
395 ldb #E$UnkSVc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397
1320
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
398 Close cmpa #SS.Close close the device?
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
399 bne L0173
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
400 leax V.BUFF,u point to blocked process buffer
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
401
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
402 C010 lda 1,x get next process number
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
403 sta ,x+
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
404 bne C010 do until we have a zero byte
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
405
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
406 lda V.BUFF,u get the first process in the queue
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
407 beq C020 if none left
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
408 ldb #S$Wake wake up signal
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
409 os9 F$Send re-start the blocked process
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
410
68bc2285ea17 Back-ported from OS-9 Level Two
boisy
parents: 1287
diff changeset
411 C020 clrb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 end