annotate level1/modules/ddisk.asm @ 1051:ede9419dc8ce

continued commenting
author pwz
date Thu, 20 Mar 2003 09:39:00 +0000
parents 360005465b59
children 10957d54bf16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
1 ********************************************************************
507
360005465b59 Added appropriate header
boisy
parents: 319
diff changeset
2 * DDisk - Dragon Floppy driver
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
3 *
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
4 * $Id$
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
5 *
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
7 * ------------------------------------------------------------------
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
8 * - Original Dragon Data distribution version
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
9
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
10 nam DDisk
507
360005465b59 Added appropriate header
boisy
parents: 319
diff changeset
11 ttl Dragon Floppy driver
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
12
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
13 * Disassembled 02/04/21 22:37:46 by Disasm v1.6 (C) 1988 by RML
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
14
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
15 ifp1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
16 use defsfile
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
17 use rbfdefs
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
18 endc
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
19
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
20 tylg set Drivr+Objct
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
21 atrv set ReEnt+rev
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
22 rev set $01
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
23 edition set 3
9b252bfd492e More comments
roug
parents: 284
diff changeset
24
9b252bfd492e More comments
roug
parents: 284
diff changeset
25 MaxDrv set 4
9b252bfd492e More comments
roug
parents: 284
diff changeset
26
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
27 mod eom,name,tylg,atrv,start,size
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
28 u0000 rmb 3
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
29 u0003 rmb 2
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
30 u0005 rmb 1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
31 u0006 rmb 2
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
32 u0008 rmb 7
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
33 u000F rmb 19
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
34 u0022 rmb 1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
35 u0023 rmb 29
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
36 u0040 rmb 3
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
37 u0043 rmb 5
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
38 u0048 rmb 95
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
39 u00A7 rmb 2
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
40 DrivSel rmb 1
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
41 u00AA rmb 1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
42 u00AB rmb 1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
43 u00AC rmb 1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
44 u00AD rmb 2
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
45 size equ .
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
46 fcb $FF
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
47 name equ *
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
48 fcs /DDisk/
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
49 fcb edition
9b252bfd492e More comments
roug
parents: 284
diff changeset
50
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
51 start lbra Init
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
52 lbra Read
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
53 lbra Write
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
54 lbra GetStat
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
55 lbra SetStat
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
56 lbra Term
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
57
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
58 * Init
9b252bfd492e More comments
roug
parents: 284
diff changeset
59 *
9b252bfd492e More comments
roug
parents: 284
diff changeset
60 * Entry:
9b252bfd492e More comments
roug
parents: 284
diff changeset
61 * Y = address of device descriptor
9b252bfd492e More comments
roug
parents: 284
diff changeset
62 * U = address of device memory area
9b252bfd492e More comments
roug
parents: 284
diff changeset
63 *
9b252bfd492e More comments
roug
parents: 284
diff changeset
64 * Exit:
9b252bfd492e More comments
roug
parents: 284
diff changeset
65 * CC = carry set on error
9b252bfd492e More comments
roug
parents: 284
diff changeset
66 * B = error code
9b252bfd492e More comments
roug
parents: 284
diff changeset
67 *
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
68 Init clra
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
69 sta >$006F
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
70 sta >DPort+8
9b252bfd492e More comments
roug
parents: 284
diff changeset
71 ldx #DPort
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
72 lda #$D0
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
73 sta ,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
74 lbsr L02AB
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
75 lda ,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
76 lda #$FF
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
77 ldb #MaxDrv
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
78 leax u000F,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
79 L003F sta ,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
80 sta <$15,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
81 leax <$26,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
82 decb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
83 bne L003F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
84 leax >L0172,pcr
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
85 stx >$010A
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
86 lda #$7E
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
87 sta >$0109
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
88 ldd #$0100
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
89 pshs u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
90 os9 F$SRqMem
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
91 tfr u,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
92 puls u
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
93 bcs Return
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
94 stx >u00AD,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
95 clrb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
96 Return rts
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
97
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
98 * GetStat
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
99 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
100 * Entry:
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
101 * A = function code
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
102 * Y = address of path descriptor
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
103 * U = address of device memory area
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
104 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
105 * Exit:
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
106 * CC = carry set on error
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
107 * B = error code
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
108 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
109 GetStat
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
110
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
111 * Term
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
112 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
113 * Entry:
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
114 * U = address of device memory area
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
115 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
116 * Exit:
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
117 * CC = carry set on error
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
118 * B = error code
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
119 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
120 Term clrb
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
121 rts
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
122
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
123 * Read
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
124 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
125 * Entry:
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
126 * B = MSB of the disk's LSN
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
127 * X = LSB of the disk's LSN
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
128 * Y = address of path descriptor
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
129 * U = address of device memory area
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
130 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
131 * Exit:
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
132 * CC = carry set on error
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
133 * B = error code
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
134 *
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
135 Read lda #$91
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
136 cmpx #$0000
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
137 bne L0096
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
138 bsr L0096
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
139 bcs L008C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
140 ldx $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
141 pshs y,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
142 ldy >u00A7,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
143 ldb #$14
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
144 L0082 lda b,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
145 sta b,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
146 decb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
147 bpl L0082
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
148 clrb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
149 puls pc,y,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
150 L008C rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
151 L008D bcc L0096
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
152 pshs x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
153 lbsr L02E9
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
154 puls x,b,a
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
155
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
156 L0096 pshs x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
157 bsr L00A1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
158 puls x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
159 bcc L008C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
160 lsra
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
161 bne L008D
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
162 L00A1 lbsr L01BC
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
163 bcs L008C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
164 ldx $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
165 pshs y,dp,cc
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
166 ldb #$88
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
167 bsr L00C6
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
168 L00AE lda <u0023
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
169 bmi L00BE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
170 leay -$01,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
171 bne L00AE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
172 bsr L0107
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
173 puls y,dp,cc
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
174 lbra L0288
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
175 L00BD sync
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
176 L00BE lda <u0043
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
177 ldb <u0022
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
178 sta ,x+
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
179 bra L00BD
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
180 L00C6 lda #$FF
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
181 tfr a,dp
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
182 lda <u0006
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
183 sta >u00AC,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
184 anda #$FE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
185 sta <u0006
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
186 bita #$40
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
187 beq L00DE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
188 L00D8 lda <u0005
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
189 bita #$10
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
190 beq L00D8
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
191 L00DE orcc #$50
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
192 lda <u0003
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
193 sta >u00AB,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
194 lda #$34
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
195 sta <u0003
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
196 lda <u0006
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
197 anda #$FE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
198 sta <u0006
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
199 lda <u0023
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
200 ora #$03
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
201 sta <u0023
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
202 lda <u0022
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
203 ldy #$FFFF
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
204 lda #$24
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
205 ora >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
206 stb <u0040
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
207 sta <u0048
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
208 rts
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
209 L0107 lda >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
210 ora #$04
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
211 sta <u0048
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
212 lda >u00AB,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
213 sta <u0003
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
214 lda <u0023
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
215 anda #$FC
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
216 sta <u0023
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
217 lda >u00AC,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
218 sta <u0006
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
219 rts
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
220
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
221 * Write
9b252bfd492e More comments
roug
parents: 284
diff changeset
222 *
9b252bfd492e More comments
roug
parents: 284
diff changeset
223 * Entry:
9b252bfd492e More comments
roug
parents: 284
diff changeset
224 * B = MSB of the disk's LSN
9b252bfd492e More comments
roug
parents: 284
diff changeset
225 * X = LSB of the disk's LSN
9b252bfd492e More comments
roug
parents: 284
diff changeset
226 * Y = address of path descriptor
9b252bfd492e More comments
roug
parents: 284
diff changeset
227 * U = address of device memory area
9b252bfd492e More comments
roug
parents: 284
diff changeset
228 *
9b252bfd492e More comments
roug
parents: 284
diff changeset
229 * Exit:
9b252bfd492e More comments
roug
parents: 284
diff changeset
230 * CC = carry set on error
9b252bfd492e More comments
roug
parents: 284
diff changeset
231 * B = error code
9b252bfd492e More comments
roug
parents: 284
diff changeset
232 *
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
233 Write lda #$91
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
234 L0124 pshs x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
235 bsr L0148
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
236 puls x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
237 bcs L0138
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
238 tst <$28,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
239 bne L0136
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
240 lbsr L0184
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
241 bcs L0138
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
242 L0136 clrb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
243 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
244 L0138 lsra
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
245 lbeq L027C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
246 bcc L0124
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
247 pshs x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
248 lbsr L02E9
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
249 puls x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
250 bra L0124
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
251 L0148 lbsr L01BC
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
252 lbcs L008C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
253 ldx $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
254 pshs y,dp,cc
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
255 ldb #$A8
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
256 L0155 lbsr L00C6
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
257 lda ,x+
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
258 L015A ldb <u0023
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
259 bmi L016C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
260 leay -$01,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
261 bne L015A
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
262 bsr L0107
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
263 puls y,dp,cc
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
264 lbra L027C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
265 L0169 lda ,x+
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
266 sync
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
267 L016C sta <u0043
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
268 ldb <u0022
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
269 bra L0169
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
270 L0172 leas $0C,s
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
271 bsr L0107
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
272 puls y,dp,cc
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
273 ldb >DPort
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
274 bitb #$04
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
275 lbne L0288
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
276 lbra L025A
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
277 L0184 pshs x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
278 ldx $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
279 pshs x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
280 ldx >u00AD,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
281 stx $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
282 ldx $04,s
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
283 lbsr L00A1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
284 puls x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
285 stx $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
286 bcs L01BA
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
287 lda #$20
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
288 pshs u,y,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
289 ldy >u00AD,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
290 tfr x,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
291 L01A6 ldx ,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
292 cmpx ,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
293 bne L01B6
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
294 leau u0008,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
295 leay $08,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
296 dec ,s
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
297 bne L01A6
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
298 bra L01B8
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
299 L01B6 orcc #$01
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
300 L01B8 puls u,y,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
301 L01BA puls pc,x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
302 L01BC clr >u00AA,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
303 bsr L022F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
304 tstb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
305 bne L01D6
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
306 tfr x,d
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
307 ldx >u00A7,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
308 cmpd #$0000
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
309 beq L01FB
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
310 cmpd $01,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
311 bcs L01DA
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
312 L01D6 comb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
313 ldb #$F1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
314 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
315 L01DA clr ,-s
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
316 bra L01E0
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
317 L01DE inc ,s
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
318 L01E0 subd #$0012
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
319 bcc L01DE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
320 addb #$12
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
321 puls a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
322 cmpa #$10
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
323 bls L01FB
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
324 pshs a
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
325 lda >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
326 ora #$10
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
327 sta >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
328 puls a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
329 L01FB incb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
330 L01FC stb >DPort+2
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
331 lbsr L02AB
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
332 cmpb >DPort+2
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
333 bne L01FC
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
334 L0207 ldb <$15,x
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
335 stb >DPort+1
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
336 tst >u00AA,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
337 bne L0218
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
338 cmpa <$15,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
339 beq L022D
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
340 L0218 sta <$15,x
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
341 sta >DPort+3
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
342 ldb #$12
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
343 bsr L028C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
344 pshs x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
345 ldx #$222E
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
346 L0227 leax -$01,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
347 bne L0227
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
348 puls x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
349 L022D clrb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
350 rts
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
351
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
352 L022F lbsr L0305
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
353 lda <$21,y
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
354 cmpa #MaxDrv
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
355 bcs L023D
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
356 comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
357 ldb #E$Unit
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
358 rts
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
359
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
360 L023D pshs x,b,a
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
361 sta >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
362 leax u000F,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
363 ldb #$26
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
364 mul
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
365 leax d,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
366 cmpx >u00A7,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
367 beq L0258
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
368 stx >u00A7,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
369 com >u00AA,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
370 L0258 puls pc,x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
371 L025A bitb #$F8
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
372 beq L0272
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
373 bitb #$80
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
374 bne L0274
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
375 bitb #$40
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
376 bne L0278
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
377 bitb #$20
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
378 bne L027C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
379 bitb #$10
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
380 bne L0280
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
381 bitb #$08
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
382 bne L0284
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
383 L0272 clrb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
384 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
385 L0274 comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
386 ldb #E$NotRdy
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
387 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
388 L0278 comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
389 ldb #E$WP
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
390 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
391 L027C comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
392 ldb #E$Write
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
393 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
394 L0280 comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
395 ldb #E$Seek
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
396 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
397 L0284 comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
398 ldb #E$CRC
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
399 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
400 L0288 comb
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
401 ldb #E$Read
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
402 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
403 L028C bsr L02A9
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
404 L028E ldb >DPort
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
405 bitb #$01
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
406 beq L02B1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
407 lda #$F0
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
408 sta >$006F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
409 bra L028E
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
410 L029C lda #$04
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
411 ora >DrivSel,u
9b252bfd492e More comments
roug
parents: 284
diff changeset
412 sta >DPort+8
9b252bfd492e More comments
roug
parents: 284
diff changeset
413 stb >DPort
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
414 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
415 L02A9 bsr L029C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
416 L02AB lbsr L02AE
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
417 L02AE lbsr L02B1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
418 L02B1 rts
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
419
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
420 * SetStat
9b252bfd492e More comments
roug
parents: 284
diff changeset
421 *
9b252bfd492e More comments
roug
parents: 284
diff changeset
422 * Entry:
9b252bfd492e More comments
roug
parents: 284
diff changeset
423 * A = function code
9b252bfd492e More comments
roug
parents: 284
diff changeset
424 * Y = address of path descriptor
9b252bfd492e More comments
roug
parents: 284
diff changeset
425 * U = address of device memory area
9b252bfd492e More comments
roug
parents: 284
diff changeset
426 *
9b252bfd492e More comments
roug
parents: 284
diff changeset
427 * Exit:
9b252bfd492e More comments
roug
parents: 284
diff changeset
428 * CC = carry set on error
9b252bfd492e More comments
roug
parents: 284
diff changeset
429 * B = error code
9b252bfd492e More comments
roug
parents: 284
diff changeset
430 *
284
cdd38ec4f526 Inserted some comments copied from ccdisk
roug
parents: 240
diff changeset
431 SetStat ldx $06,y
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
432 ldb $02,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
433 cmpb #$03
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
434 beq L02E9
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
435 cmpb #$04
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
436 beq L02C2
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
437 comb
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
438 ldb #$D0
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
439 L02C1 rts
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
440 L02C2 lbsr L022F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
441 lda $09,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
442 cmpa #$10
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
443 bls L02D5
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
444 ldb >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
445 orb #$10
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
446 stb >DrivSel,u
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
447 L02D5 ldx >u00A7,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
448 lbsr L0207
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
449 bcs L02C1
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
450 ldx $06,y
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
451 ldx $04,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
452 ldb #$F0
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
453 pshs y,dp,cc
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
454 lbra L0155
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
455 L02E9 lbsr L022F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
456 ldx >u00A7,u
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
457 clr <$15,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
458 lda #$05
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
459 L02F5 ldb #$42
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
460 pshs a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
461 lbsr L028C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
462 puls a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
463 deca
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
464 bne L02F5
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
465 ldb #$02
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
466 bra L028C
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
467 L0305 pshs x,b,a
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
468 lda >$006F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
469 bne L031A
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
470 lda #$04
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
471 sta >DPort+8
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
472 ldx #$A000
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
473 L0314 nop
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
474 nop
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
475 leax -$01,x
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
476 bne L0314
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
477 L031A lda #$F0
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
478 sta >$006F
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
479 puls pc,x,b,a
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
480
240
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
481 emod
7c673ea162ca That's the lot. Devicedrivers and device descriptors from Dragon
roug
parents:
diff changeset
482 eom equ *
319
9b252bfd492e More comments
roug
parents: 284
diff changeset
483 end