annotate level1/modules/rbdw3.asm @ 2640:8d24c482646e

o increased timeout in atari dwread.asm module o fixed bug in rbdw3.asm where OP_INIT wasn't being sent o replaced constant offset jumps into dw3.sb with labels
author Boisy Pitre <boisy.pitre@nuance.com>
date Tue, 28 Feb 2012 23:09:32 -0600
parents 4e5ff2c5b512
children 2ebf5e737ceb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
1 ********************************************************************
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
2 * rbdw3 - DriveWire 3 driver
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
3 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
4 * $Id$
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
5 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
6 * This driver works in conjuction with the DriveWire Server on Linux,
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
7 * Mac or Windows, providing the CoCo with pseudo-disk access through
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
8 * the serial port.
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
9 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
10 * It adheres to the DriveWire Version 3 Protocol.
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
11 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
12 * The baud rate is set at 115200 and the communications requirements
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
13 * are set to 8-N-1. For OS-9 Level One on a CoCo 2, the baud rate
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
14 * is 57600.
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
15 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
16 * Edt/Rev YYYY/MM/DD Modified by
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
17 * Comment
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
18 * ------------------------------------------------------------------
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
19 * 1 2008/02/08 Boisy G. Pitre
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
20 * Started from drivewire.asm in DriveWire 2 Product folder.
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
21 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
22 * 2 2008/04/22 Boisy G. Pitre
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
23 * Verified working operation on a CoCo 3 running NitrOS-9/6809 Level 1 @ 57.6Kbps
2194
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
24 *
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
25 * 3 2009/03/09 Boisy G. Pitre
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
26 * Added checks for size after reading as noted by Darren A's email.
2298
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
27 *
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
28 * 4 2009/12/31 Boisy G. Pitre
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
29 * Fixed a crash in Term by adding a check for DWSubAddr of $0000
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
30 * (possible if Init fails due to subroutine module not being in
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
31 * memory and I$Detach calls Term)
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
32
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
33 nam rbdw3
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
34 ttl DriveWire 3 driver
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
35
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
36 NUMRETRIES equ 8
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
37
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
38 ifp1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
39 use defsfile
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2535
diff changeset
40 use drivewire.d
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
41 endc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
42
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
43 NumDrvs set 4
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
44
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
45 tylg set Drivr+Objct
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
46 atrv set ReEnt+rev
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
47 rev set $01
2298
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
48 edition set 4
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
49
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
50 mod eom,name,tylg,atrv,start,size
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
51
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
52 rmb DRVBEG+(DRVMEM*NumDrvs)
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
53 driveno rmb 1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
54 retries rmb 1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
55 size equ .
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
56
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
57 fcb DIR.+SHARE.+PEXEC.+PREAD.+PWRIT.+EXEC.+UPDAT.
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
58
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
59 name fcs /rbdw3/
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
60 fcb edition
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
61
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
62 start bra Init
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
63 nop
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
64 bra Read
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
65 nop
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
66 lbra Write
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
67 lbra GetStat
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
68 lbra SetStat
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
69
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
70 * Term
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
71 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
72 * Entry:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
73 * U = address of device memory area
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
74 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
75 * Exit:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
76 * CC = carry set on error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
77 * B = error code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
78 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
79 Term
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
80 clrb
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
81 pshs cc
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
82 * Send OP_TERM to the server
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
83 IFGT LEVEL-1
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
84 ldu <D.DWSubAddr
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
85 ELSE
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
86 ldu >D.DWSubAddr
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
87 ENDC
2298
d806d969eb17 Fixed a potential crash in Term
boisy
parents: 2270
diff changeset
88 * Fix crash in certain cases
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
89 beq no@
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
90 ldy #$0001
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
91 lda #OP_TERM
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
92 pshs a
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
93 leax ,s
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
94 orcc #IntMasks
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
95 jsr DW$Write,u
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
96 clrb
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
97 puls a
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
98 no@ puls cc,pc
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
99
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
100 * Init
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
101 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
102 * Entry:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
103 * Y = address of device descriptor
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
104 * U = address of device memory area
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
105 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
106 * Exit:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
107 * CC = carry set on error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
108 * B = error code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
109 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
110 Init
2210
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
111 IFGT Level-1
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
112 * Perform this so we can successfully do F$Link below
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
113 ldx <D.Proc
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
114 pshs a,x
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
115 ldx <D.SysPrc
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
116 stx <D.Proc
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
117 ELSE
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
118 pshs a
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
119 ENDC
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
120
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
121 ldb #NumDrvs
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
122 stb V.NDRV,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
123 leax DRVBEG,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
124 lda #$FF
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
125 Init2 sta DD.TOT,x invalidate drive tables
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
126 sta DD.TOT+1,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
127 sta DD.TOT+2,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
128 leax DRVMEM,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
129 decb
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
130 bne Init2
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
131
2309
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
132 * Check if subroutine module has already been linked
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
133 IFGT LEVEL-1
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
134 ldu <D.DWSubAddr
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
135 ELSE
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
136 ldu >D.DWSubAddr
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
137 ENDC
2535
44f8ba0d87a4 Fixed crash in init routine
boisy
parents: 2309
diff changeset
138 bne InitEx
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
139 * Link to subroutine module
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
140 clra
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
141 leax name+2,pcr
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
142 os9 F$Link
2210
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
143 bcs InitEx
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
144 tfr y,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
145 IFGT LEVEL-1
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
146 stu <D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
147 ELSE
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
148 stu >D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
149 ENDC
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
150 * Initialize the low level device
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
151 jsr DW$Init,u
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
152 lda #OP_INIT
2640
8d24c482646e o increased timeout in atari dwread.asm module
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2636
diff changeset
153 sta ,s
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
154 leax ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
155 ldy #$0001
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
156 jsr DW$Write,u
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
157 clrb
2210
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
158
2211
0d9a3b9b5886 Fixed incorrect label
boisy
parents: 2210
diff changeset
159 InitEx
2210
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
160 IFGT Level-1
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
161 puls a,x
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
162 stx <D.Proc
2309
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
163 InitEx2
2210
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
164 rts
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
165 ELSE
2309
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2298
diff changeset
166 InitEx2
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
167 puls a,pc
2210
7ee1bed662f2 Fixed driver to copy D.SysPrc in Level 2 to D.Proc before link
boisy
parents: 2195
diff changeset
168 ENDC
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
169
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
170 * Read
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
171 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
172 * Entry:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
173 * B = MSB of LSN
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
174 * X = LSB of LSN
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
175 * Y = address of path descriptor
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
176 * U = address of device memory area
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
177 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
178 * Exit:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
179 * CC = carry set on error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
180 * B = error code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
181 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
182 Read
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
183 lda #NUMRETRIES
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
184 sta retries,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
185 cmpx #$0000 LSN 0?
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
186 bne ReadSect branch if not
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
187 tstb LSN 0?
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
188 bne ReadSect branch if not
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
189 * At this point we are reading LSN0
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
190 bsr ReadSect read the sector
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
191 bcs CpyLSNEx if error, exit
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
192 leax DRVBEG,u point to start of drive table
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
193 ldb <PD.DRV,y get drive number
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
194 NextDrv beq CopyLSN0 branch if terminal count
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
195 leax <DRVMEM,x else move to next drive table entry
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
196 decb decrement counter
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
197 bra NextDrv and continue
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
198 CopyLSN0 ldb #DD.SIZ get size to copy
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
199 ldy PD.BUF,y point to buffer
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
200 CpyLSNLp lda ,y+ get byte from buffer
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
201 sta ,x+ and save in drive table
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
202 decb
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
203 bne CpyLSNLp
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
204 CpyLSNEx rts
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
205
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
206
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
207 ReadSect pshs cc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
208 pshs u,y,x,b,a,cc then push CC and others on stack
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
209 * Send out op code and 3 byte LSN
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
210 lda PD.DRV,y get drive number
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
211 cmpa #NumDrvs
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
212 blo Read1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
213 ldb #E$Unit
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
214 bra ReadEr2
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
215 Read1 sta driveno,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
216 lda #OP_READEX load A with READ opcode
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
217
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
218 Read2
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
219 ldb driveno,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
220 leax ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
221 std ,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
222 ldy #5
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
223 IFGT LEVEL-1
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
224 ldu <D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
225 ELSE
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
226 ldu >D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
227 ENDC
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
228 orcc #IntMasks
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
229 jsr DW$Write,u
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
230
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
231 * Get 256 bytes of sector data
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
232 ldx 5,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
233 ldx PD.BUF,x get buffer pointer into X
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2211
diff changeset
234 ldy #$0100
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
235 jsr DW$Read,u
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
236 bcs ReadEr1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
237 bne ReadEr1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
238 pshs y
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
239 leax ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
240 ldy #$0002
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
241 jsr DW$Write,u write checksum to server
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
242
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
243 * Get error code byte
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
244 leax ,s
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2211
diff changeset
245 ldy #$0001
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
246 jsr DW$Read,u
2194
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
247 bcs ReadEr0 branch if we timed out
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
248 bne ReadEr0
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
249 puls d
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
250 tfr a,b transfer byte to B (in case of error)
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
251 tstb is it zero?
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
252 beq ReadEx if not, exit with error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
253 cmpb #E$CRC
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
254 bne ReadEr2
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
255 ldu 7,s get U from stack
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
256 dec retries,u decrement retries
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
257 beq ReadEr1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
258
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
259 lda #OP_REREADEX reread opcode
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
260 bra Read2 and try getting sector again
2195
8b38d4f75b44 Addressed issue raised by Darren A about checking error code size
boisy
parents: 2194
diff changeset
261 ReadEr0 puls d
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
262 ReadEr1 ldb #E$Read read error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
263 ReadEr2 lda 9,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
264 ora #Carry
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
265 sta 9,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
266 ReadEx leas 5,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
267 puls y,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
268 puls cc,pc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
269
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
270 * Write
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
271 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
272 * Entry:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
273 * B = MSB of LSN
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
274 * X = LSB of LSN
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
275 * Y = address of path descriptor
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
276 * U = address of device memory area
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
277 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
278 * Exit:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
279 * CC = carry set on error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
280 * B = error code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
281 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
282 Write lda #NUMRETRIES
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
283 sta retries,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
284 pshs cc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
285 pshs u,y,x,b,a,cc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
286 * Send out op code and 3 byte LSN
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
287 lda PD.DRV,y
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
288 cmpa #NumDrvs
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
289 blo Write1
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
290 comb set Carry
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
291 ldb #E$Unit
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
292 bra WritEx
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
293 Write1 sta driveno,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
294 lda #OP_WRITE
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
295 Write15
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
296 ldb driveno,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
297 leax ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
298 std ,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
299 ldy #$0005
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
300 IFGT LEVEL-1
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
301 ldu <D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
302 ELSE
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
303 ldu >D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
304 ENDC
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
305 orcc #IntMasks
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
306 jsr DW$Write,u
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
307
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
308 * Compute checksum on sector we just sent and send checksum to server
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
309 ldy 5,s get Y from stack
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
310 ldx PD.BUF,y point to buffer
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
311 ldy #256
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
312 jsr 6,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
313 leax -256,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
314 bsr DoCSum
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
315 pshs d
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
316 leax ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
317 ldy #$0002
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
318 jsr DW$Write,u
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
319
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
320 * Await acknowledgement from server on receipt of sector
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
321 leax ,s
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2211
diff changeset
322 ldy #$0001
2636
4e5ff2c5b512 Optimized Term routine
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
323 jsr DW$Read,u read ack byte from server
2194
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
324 bcs WritEx0
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
325 bne WritEx0
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
326 puls d
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
327 tsta
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
328 beq WritEx yep
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
329 tfr a,b
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
330 cmpb #E$CRC checksum error?
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
331 bne WritEx2
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
332 ldu 7,s get U from stack
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
333 dec retries,u decrement retries
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
334 beq WritEx1 exit with error if no more
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
335 lda #OP_REWRIT else resend
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
336 bra Write15
2194
8a96f5241556 *** empty log message ***
boisy
parents: 2180
diff changeset
337 WritEx0 puls d
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
338 WritEx1 ldb #E$Write
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
339 WritEx2 lda 9,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
340 ora #Carry
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
341 sta 9,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
342 WritEx leas 5,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
343 puls y,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
344 puls cc,pc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
345
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
346 use dwcheck.asm
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
347
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
348 * SetStat
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
349 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
350 * Entry:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
351 * R$B = function code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
352 * Y = address of path descriptor
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
353 * U = address of device memory area
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
354 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
355 * Exit:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
356 * CC = carry set on error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
357 * B = error code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
358 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
359 SetStat lda #OP_SETSTA
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
360 * Size optimization
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
361 fcb $8C skip next two bytes
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
362
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
363
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
364 * GetStat
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
365 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
366 * Entry:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
367 * R$B = function code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
368 * Y = address of path descriptor
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
369 * U = address of device memory area
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
370 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
371 * Exit:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
372 * CC = carry set on error
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
373 * B = error code
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
374 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
375 GetStat
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
376 lda #OP_GETSTA
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
377 clrb clear Carry
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
378 pshs cc and push CC on stack
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
379 leas -3,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
380 sta ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
381 lda PD.DRV,y get drive number
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
382 ldx PD.RGS,y
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
383 ldb R$B,x
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
384 std 1,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
385 leax ,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
386 ldy #$0003
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
387 IFGT LEVEL-1
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
388 ldu <D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
389 ELSE
2270
07b2433f0c65 moved dwdefs.d to defs/, major changes to drivers due to new globals arrangement.
boisy
parents: 2231
diff changeset
390 ldu >D.DWSubAddr
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
391 ENDC
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
392 jsr 6,u
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
393 leas 3,s
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
394 puls cc,pc
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
395
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
396 emod
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
397 eom equ *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
398 end