Mercurial > hg > Members > kono > nitros9-code
annotate level1/modules/boot_rom.asm @ 3139:96cb9d947e0b
New low-level driver for CoCo3FPGA SD card interface
From Gary Becker.
Add llcoco3fpga.asm to level1/modules
author | Bill Pierce <merlinious999@gmail.com> |
---|---|
date | Sat, 04 Feb 2017 11:06:18 +0100 |
parents | 5a5cff419c0b |
children |
rev | line source |
---|---|
2609
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
1 ******************************************************************** |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
2 * Boot - NitrOS-9 ROM Boot Module |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
3 * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
4 * $Id: boot_rom.asm,v 1.1 2004/04/05 03:34:39 boisy Exp $ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
5 * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
6 * Edt/Rev YYYY/MM/DD Modified by |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
7 * Comment |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
8 * ------------------------------------------------------------------ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
9 * 1 1998/??/?? Boisy G. Pitre |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
10 * Created. |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
11 * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
12 * 1r1 2003/09/07 Boisy G. Pitre |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
13 * Added 6309 optimizations |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
14 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
15 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
16 nam Boot |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
17 ttl NitrOS-9 Level 1 ROM Boot Module |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
18 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
19 ifp1 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
20 use defsfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
21 endc |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
22 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
23 tylg set Systm+Objct |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
24 atrv set ReEnt+rev |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
25 rev set $01 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
26 edition set 1 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
27 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
28 mod eom,name,tylg,atrv,start,size |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
29 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
30 size equ . |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
31 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
32 name fcs /Boot/ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
33 fcb edition |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
34 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
35 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
36 * obtain bootfile size at known offset |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
37 start pshs u,y,x,a,b |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
38 leax eom,pcr point to end of module |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
39 ldd ,x get size of bootfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
40 std ,s place bootfile size in A/B on stack |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
41 * allocate memory from system |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
42 os9 F$SRqMem |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
43 bcs Uhoh |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
44 * copy bootfile from low RAM to allocated area |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
45 stu 2,s place address in X loc. on stack |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
46 ldx #$2600+$1200 X points to bootfile in ROM |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
47 IFNE H6309 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
48 ldw ,s get bootfile size from A/B on stack |
3044
5a5cff419c0b
Fix up typos in level1 6309 code
Tormod Volden <debian.tormod@gmail.com>
parents:
2609
diff
changeset
|
49 tfm x+,u+ |
2609
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
50 ELSE |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
51 ldd ,s get bootfile size from A/B on stack |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
52 Loop ldy ,x++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
53 sty ,u++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
54 subd #2 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
55 bgt Loop |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
56 ENDC |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
57 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
58 * Upon exit, we return to the kernel with: |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
59 * X = address of bootfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
60 * D = size of bootfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
61 Uhoh puls u,y,x,a,b,pc |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
62 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
63 emod |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
64 eom equ * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
65 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
66 * Size of bootfile (maximum is put here) |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
67 fdb $2E00 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
68 |