annotate 3rdparty/booters/boot_tc3.asm @ 57:a2e1e7563ed7

Changed README, removed binaries
author boisy
date Sat, 20 Apr 2002 15:14:04 +0000
parents 2ce754e62499
children 02a065f8428c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
1 ********************************************************************
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
2 * Boot - Cloud-9 TC3 Boot module
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
3 *
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
4 * $Id$
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
5 *
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
6 * This module allows booting from a hard drive that uses RGB-DOS
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
7 * and is controlled by a Cloud-9 TC3 SCSI controller.
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
8 *
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
9 * Ed. Comments Who YY/MM/DD
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
10 * ------------------------------------------------------------------
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
11 * 1 Original Roger Krupski distribution version
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
12 * 1b Added code to allow booting from any sector BGP 96/??/??
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
13 * size hard drive
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
14
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
15
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
16 nam Boot
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
17 ttl Cloud-9 TC3 Boot module
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
18
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
19 ifp1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
20 use defsfile
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
21 endc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
22
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
23 tylg set Systm+Objct
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
24 atrv set ReEnt+rev
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
25 rev set 2
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
26 edition set 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
27
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
28 * Hard Disk Interface registers for the TC3
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
29 dataport equ $FF76
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
30 status equ dataport+1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
31 select equ dataport+1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
32
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
33 * Status register equates
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
34 req equ 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
35 busy equ 2
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
36 msg equ 4
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
37 cmd equ 8
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
38 inout equ $10
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
39 ack equ $20
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
40 sel equ $40
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
41 rst equ $80
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
42
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
43 *SCSI common command set
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
44 c$rstr equ 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
45 c$rdet equ 3
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
46 c$rblk equ 8
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
47 c$wblk equ 10
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
48
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
49 * Optional command
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
50 c$ststop equ $1b park head
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
51
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
52 * misc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
53 errsta equ 2
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
54 bsybit equ 8
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
55
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
56 ****************************************************
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
57 bootdrv equ 0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
58 ****************************************************
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
59
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
60 mod eom,name,tylg,atrv,start,size
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
61
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
62 * Data equates; subroutines must keep data in stack
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
63 v$cmd rmb 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
64 v$addr0 rmb 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
65 v$addr1 rmb 2
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
66 v$blks rmb 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
67 v$opts rmb 1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
68 v$error rmb 4
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
69
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
70 blockloc rmb 2 pointer to memory requested
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
71 blockimg rmb 2 duplicate of the above
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
72 bootloc rmb 3 sector pointer; not byte pointer
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
73 bootsize rmb 2 size in bytes
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
74 size equ .
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
75
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
76 name fcs /Boot/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
77 fcb edition
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
78
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
79 start clra
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
80 ldb #size
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
81 clean pshs a
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
82 decb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
83 bne clean
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
84 tfr s,u get pointer to data area
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
85 pshs u save pointer to data area
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
86
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
87 lda #$d0 forced interrupt; kill floppy activity
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
88 sta $FF48 command register
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
89 clrb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
90 pause decb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
91 bne pause
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
92 lda $FF48 clear controller
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
93 clr $FF40 make sure motors are turned off
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
94 sta $FFD9 fast clock
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
95
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
96 * Recalibrate hard drive
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
97 lbsr restore
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
98
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
99 * Request memory for LSN0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
100 ldd #1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
101 os9 F$SRqMem request one page of RAM
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
102 bcs error
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
103 bsr getpntr
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
104
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
105 * Get LSN0 into memory
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
106 clrb MSB sector
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
107 ldx #0 LSW sector
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
108 bsr mread
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
109 bcs error
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
110 ldd bootsize,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
111 beq error
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
112 pshs d
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
113
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
114 * Return memory
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
115 ldd #$100
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
116 ldu blockloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
117 os9 F$SRtMem
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
118 puls d
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
119 os9 F$BtMem
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
120 bcs error
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
121 bsr getpntr
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
122 std blockimg,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
123
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
124 * Get os9boot into memory
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
125 ldd bootsize,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
126 leas -2,s same as a PSHS D
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
127 getboot std ,s
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
128 ldb bootloc,u MSB sector location
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
129 ldx bootloc+1,u LSW sector location
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
130 bsr mread
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
131 ldd bootloc+1,u update sector location by one to 24bit word
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
132 addd #1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
133 std bootloc+1,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
134 ldb bootloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
135 adcb #0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
136 stb bootloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
137 inc blockloc,u update memory pointer for upload
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
138 ldd ,s update size of file left to read
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
139 subd #$100 file read one sector at a time
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
140 bhi getboot
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
141
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
142 leas 4+size,s reset the stack same as PULS U,D
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
143 ldd bootsize,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
144 ldx blockimg,u pointer to start of os9boot in memory
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
145 andcc #^Carry clear carry
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
146 rts back to os9p1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
147
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
148 error leas 2+size,s
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
149 ldb #E$NotRdy drive not ready
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
150 rts
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
151
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
152 getpntr tfr u,d save pointer to requested memory
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
153 ldu 2,s recover pointer to data stack
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
154 std blockloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
155 rts
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
156
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
157 mread tstb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
158 bne read10
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
159 cmpx #0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
160 bne read10
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
161 bsr read10
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
162 bcc readlsn0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
163 rts
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
164
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
165 readlsn0 pshs a,x,y
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
166 ldy blockloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
167 lda DD.Bt,y os9boot pointer
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
168 ldx DD.Bt+1,y LSW of 24 bit address
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
169 sta bootloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
170 stx bootloc+1,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
171 ldx DD.BSZ,y os9boot size in bytes
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
172 stx bootsize,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
173 clrb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
174 puls a,x,y,pc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
175
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
176 * Generic read
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
177 read10 lda #c$rblk
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
178 bsr setup
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
179 bra command
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
180
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
181 setup pshs b
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
182 sta v$cmd,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
183 stb v$addr0,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
184 stx v$addr1,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
185 ldb #1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
186 stb v$blks,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
187 clr v$opts,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
188 puls b,pc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
189
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
190 wakeup ldx #0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
191 wake lda status
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
192 bita #busy+sel
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
193 beq wake1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
194 leax -1,x
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
195 bne wake
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
196 bra wake4
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
197 wake1 bsr wake3
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
198 lda #1 SCSI ID!
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
199 sta dataport
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
200 bsr wake3
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
201 sta select
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
202 ldx #0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
203 wake2 lda status
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
204 bita #busy
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
205 bne wake3
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
206 leax -1,x
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
207 bne wake2
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
208 wake4 leas 2,s
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
209 comb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
210 ldb #E$NotRdy
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
211 wake3 rts
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
212
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
213 command bsr wakeup
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
214 leax v$cmd,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
215 bsr send
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
216 bsr waitrq
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
217 bita #cmd
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
218 bne getsta
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
219 ldx blockloc,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
220 bsr read
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
221 getsta bsr instat
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
222 bita #bsybit
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
223 bne command
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
224 bita #errsta
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
225 beq done
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
226 comb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
227 done rts
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
228
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
229 send bsr waitrq
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
230 bita #cmd
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
231 beq done
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
232 bita #inout
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
233 bne done
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
234 lda ,x+
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
235 sta dataport
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
236 bra send
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
237
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
238 waitrq pshs b,x
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
239 wait10 lda status
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
240 bita #req
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
241 beq wait10
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
242 puls b,x,pc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
243
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
244 * Patch to allow booting from sector sizes > 256 bytes - BGP 08/16/97
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
245 * We ignore any bytes beyond byte 256, but continue to read them from
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
246 * the dataport until the CMD bit is set.
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
247 read
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
248 * next 2 lines added
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
249 clrb +++ use B as counter
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
250 read2
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
251 bsr waitrq
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
252 bita #cmd
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
253 bne done
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
254 lda dataport
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
255 sta ,x+
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
256 * next line commented out and next 8 lines added
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
257 * bra read
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
258 incb +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
259 bne read2 +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
260 read3
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
261 bsr waitrq +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
262 bita #cmd +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
263 bne done +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
264 lda dataport +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
265 bra read3 +++
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
266
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
267 instat bsr waitrq
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
268 lda dataport
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
269 anda #%00001111
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
270 pshs a
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
271 bsr waitrq
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
272 clra
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
273 sta dataport
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
274 puls a,pc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
275
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
276 restore lda #c$rstr
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
277 clrb
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
278 ldx #0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
279 lbsr setup
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
280 clr v$blks,u
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
281 bra command
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
282
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
283 * Fillers to get to $1D0
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
284 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
285 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
286 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
287 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
288 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
289 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
290 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
291 fcc /9999999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
292 fcc /99999999/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
293
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
294 emod
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
295
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
296 eom equ *