Mercurial > hg > Members > kono > nitros9-code
annotate level2/modules/boot_rom.asm @ 3198:734862561313
3rdparty/packages: Rename particularly cryptic folder names
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sat, 03 Jun 2017 10:34:39 +0200 |
parents | 9dd4f422aac7 |
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 nam Boot |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
16 ttl NitrOS-9 Level 2 ROM Boot Module |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
17 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
18 ifp1 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
19 use defsfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
20 endc |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
21 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
22 tylg set Systm+Objct |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
23 atrv set ReEnt+rev |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
24 rev set $01 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
25 edition set 1 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
26 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
27 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
|
28 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
29 size equ . |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
30 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
31 name fcs /Boot/ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
32 fcb edition |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
33 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
34 start equ * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
35 * obtain bootfile size at known offset |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
36 pshs u,y,x,a,b,cc |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
37 orcc #IntMasks mask interrupts |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
38 * allocate memory from system |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
39 * memory will start at $8000, blocks 1, 2, 3 and 3F |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
40 * we allocate $100 bytes more so that the memory will start |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
41 * exactly at $8000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
42 ldd #$8000-$1300 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
43 os9 F$BtMem |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
44 bcs Uhoh |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
45 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
46 stu 3,s save pointer in X on stack |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
47 std 1,s save size in D on stack |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
48 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
49 * TRICK! Map block 4 into $4000, copy our special ROM copy code |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
50 * there, then jmp to it! |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
51 lda $FFA2 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
52 pshs a |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
53 lda #$04 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
54 sta $FFA2 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
55 IFNE H6309 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
56 ldw #RelCodeL |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
57 ELSE |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
58 ldd #RelCodeL code less than 256 bytes |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
59 ENDC |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
60 leax RelCode,pcr |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
61 ldy #$4800 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
62 IFNE H6309 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
63 tfm x+,y+ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
64 ELSE |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
65 Copy lda ,x+ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
66 sta ,y+ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
67 decb |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
68 bne Copy |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
69 ENDC |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
70 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
71 Jump jsr $4800 * jump to rel code |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
72 puls a restore original block at $4000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
73 sta $FFA2 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
74 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
75 * 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
|
76 * X = address of bootfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
77 * D = size of bootfile |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
78 * CC = carry cleared |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
79 ExitOK andcc #^Carry clear carry |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
80 Uhoh puls u,y,x,a,b,cc,pc |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
81 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
82 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
83 * this code executes at $4800 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
84 RelCode equ * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
85 lda #$4E CC3 mode, MMU, 32K ROM |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
86 sta $FF90 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
87 sta $FFDE ROM/RAM mode |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
88 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
89 * Map ROM Blocks in |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
90 ldd #$3C3D |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
91 std $FFA4 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
92 lda #$3E |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
93 sta $FFA6 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
94 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
95 * Map block 1 at $6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
96 lda $FFA3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
97 pshs a |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
98 lda #$01 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
99 sta $FFA3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
100 * Copy first 8K of ROM |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
101 ldx #$8000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
102 ldy #$6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
103 IFNE H6309 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
104 ldw #$2000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
105 tfm x+,y+ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
106 ELSE |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
107 Loop1 ldd ,x++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
108 std ,y++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
109 cmpx #$A000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
110 blt Loop1 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
111 ENDC |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
112 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
113 * Map block 2 at $6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
114 lda #$02 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
115 sta $FFA3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
116 * Copy second 8K of ROM |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
117 * ldx #$A000 X is already $A000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
118 ldy #$6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
119 IFNE H6309 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
120 ldw #$2000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
121 tfm x+,y+ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
122 ELSE |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
123 Loop2 ldd ,x++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
124 std ,y++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
125 cmpx #$C000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
126 blt Loop2 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
127 ENDC |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
128 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
129 * Map block 3 at $6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
130 lda #$03 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
131 sta $FFA3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
132 * Copy third 8K of ROM |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
133 * ldx #$C000 X is already $C000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
134 ldy #$6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
135 IFNE H6309 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
136 ldw #$2000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
137 tfm x+,y+ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
138 ELSE |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
139 Loop3 ldd ,x++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
140 std ,y++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
141 cmpx #$E000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
142 blt Loop3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
143 ENDC |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
144 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
145 * Copy remaining ROM area ($8000-$1300) |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
146 lda #$3F |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
147 sta $FFA3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
148 * ldx #$E000 X is already $E000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
149 ldy #$6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
150 Loop4 clr $FFDE put in ROM/RAM mode to get byte |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
151 ldd ,x++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
152 clr $FFDF put back in RAM mode to store byte |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
153 std ,y++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
154 cmpx #$EC00 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
155 blt Loop4 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
156 * ldx #$6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
157 * ldy #$E000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
158 *Loop5 ldd ,x++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
159 * std ,y++ |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
160 * cmpx #$6C00 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
161 * blt Loop5 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
162 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
163 lda D.HINIT restore GIME HINIT value |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
164 sta $FF90 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
165 puls a restore org block at $6000 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
166 sta $FFA3 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
167 lda #$03 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
168 sta $FFA6 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
169 ldd #$0102 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
170 std $FFA4 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
171 rts |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
172 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
173 RelCodeL equ *-RelCode |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
174 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
175 * Fillers to get to $1D0 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
176 Pad fill $39,$1D0-3-* |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
177 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
178 emod |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
179 eom equ * |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
180 |
9dd4f422aac7
Added NitrOS-9 ROM Kit from Cloud-9
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff
changeset
|
181 end |