annotate level1/modules/rel.asm @ 1890:1021c2fd0c67

virtual disk descriptor program for DragonPlus add-on
author afra
date Wed, 12 Oct 2005 01:09:22 +0000
parents 59026f50b87f
children 25b468210b37
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
1 ********************************************************************
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
2 * REL - Relocation routine
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
3 *
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
4 * $Id$
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
5 *
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
7 * Comment
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
9 * 5r5 2003/07/31 Boisy G. Pitre
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
10 * Back ported NitrOS-9 REL to OS-9 Level Two.
1798
6a1f2b1eefb8 More updates
boisy
parents: 1727
diff changeset
11 *
6a1f2b1eefb8 More updates
boisy
parents: 1727
diff changeset
12 * 2004/11/09 P.Harvey-Smith
1727
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
13 * Added code to flip Dragon Alpha into text mode on boot.
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
14 *
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
15
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
16 nam REL
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
17 ttl Relocation routine
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
18
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
19 IFP1
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
20 use defsfile
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
21 ENDC
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
22
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
23 XX.Size equ 6 number of bytes before REL actually starts
1309
0a04945a7c60 Fixed bug in rel.asm, changed OS-9 Level One Bt.Start to $EE00 and Bt.Size to $1080 due to increased size of boot track using DriveWire booter.
boisy
parents: 1301
diff changeset
24 Offset equ Bt.Start+XX.Size
1854
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
25 IFEQ Level-1
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
26 ScStart equ $8000 screen start in memory
1854
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
27 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
28 ScStart equ $8008 screen start in memory
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
29 ENDC
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
30
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
31 tylg set Systm+Objct
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
32 atrv set ReEnt+rev
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
33 rev set $05
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
34 edition set 5
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
35
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
36 ********************************************************************
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
37 * Any changes to the next 3 lines requires changes in XX.Size, above
1301
4a50c6fb28b2 Fixed problem with copying at Bt.Start
boisy
parents: 1299
diff changeset
38 fcc /OS/ sync bytes
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
39 bra Start+XX.Size execution start
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
40 fdb $1205 filler bytes
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
41
1301
4a50c6fb28b2 Fixed problem with copying at Bt.Start
boisy
parents: 1299
diff changeset
42 Begin mod eom,name,tylg,atrv,start,size
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
43
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
44 org 0
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
45 size equ . REL doesn't require any memory
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
46
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
47 name fcs /REL/
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
48 fcb edition
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
49
1854
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
50 IFGT Level-1
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
51
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
52 L001F fcb $6C MMU, IRQ, Vector page, SCS
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
53 fcb $00 map type 0
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
54 fcb $00 no FIRQ
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
55 fcb $00 no IRQ
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
56 fdb $0900 timer
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
57 fcb $00 unused
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
58 fcb $00 unused
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
59 IFEQ TkPerSec-50
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
60 fcb $0B 50Hz refresh, alphanumeric display, 8 lines/char row
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
61 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
62 fcb $03 60Hz refresh, alphanumeric display, 8 lines/char row
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
63 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
64
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
65 IFEQ Width-80
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
66 fcb $34 200 lines, 80 column mode, no attribute byte (monochrome)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
67 fcb $3F white border
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
68 BOOTLINE set 11 80-col start line for BOOT/FAIL messages
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
69 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
70
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
71 IFEQ Width-40
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
72 fcb $24 200 lines, 40-col, no attribute byte
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
73 fcb $3F white border
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
74 BOOTLINE set 13 40-col start line for BOOT/FAIL messages
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
75 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
76
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
77 IFEQ Width-32
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
78 fcb $20 200 lines, 32-col, no attribute byte
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
79 fcb $00 black border
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
80 BOOTLINE set 13 32-col start line for BOOT/FAIL messages
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
81 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
82
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
83 fcb $00 display in lower 512k bank
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
84 fcb $00 vertical fine scroll set to 0
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
85 fcb Bt.Block*4 display block where-ever
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
86 fcb $01 offset 8 bytes
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
87 fcb $00 no horizontal scroll
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
88
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
89 crash lda #'* signal a crash error
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
90 jsr <D.BtBug
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
91 tfr b,a save error code
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
92 jsr <D.BtBug and dump this out, too
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
93 clrb
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
94 fcb $8C skip 2 bytes
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
95
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
96 reset equ * later on, have reset different from start?
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
97 start ldb #$FF negative - do complete boot
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
98 clr >$FFDF added for OS-9 ROM Kit boots +BGP+
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
99
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
100 start1 orcc #IntMasks turn off IRQ's
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
101 clr >PIA0Base+3 turn off SAM IRQ's
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
102 clra make A=0 for later
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
103 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
104 tfr 0,dp set direct page to $0000
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
105 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
106 tfr a,dp
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
107 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
108 clr <D.CBStrt cold boot start: don't re-boot on reset
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
109 clr >$FFA0 map in block 0
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
110 lds #$1FFF set stack to the end of the block
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
111 stb ,-s save status of start, $00=cold, $01=warm
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
112 * This is done so I can tell what went on in the direct page if there's
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
113 * a crash. 0(crash) 1(reset) -1(startup)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
114 beq Cont --don't clear out direct page if it's a crash
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
115 ldb #$20 start out at $20
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
116 tfr d,x here, too
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
117 L0072 sta ,x+ clear out the direct page
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
118 incb Boot won't be using any of it!
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
119 bne L0072 BUT RAMMER/MD DOES!!!
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
120 inc <D.Speed 0+1=1; high speed
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
121 Cont clrb --make sure B=0
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
122 stb >$FFD9 set to high speed
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
123 leay <L001F,pcr point to the video setup data
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
124 ldx #$0090 set video mapping
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
125 deca now D=$FF00, versus STU >-$0100,x (saves 1 byte)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
126 L0084 ldu ,y++ get the bytes
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
127 stu d,x save in the hardware
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
128 stu ,x++ and in the direct page
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
129 cmpx #$00A0 end of video hardware yet?
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
130 bcs L0084
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
131
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
132 IFEQ Width-32
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
133 ldd #$1200 color 0=$12, 1=$00 i.e. black on green
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
134 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
135 ldd #$3F00 color 0=$3F, 1=$00, i.e. black on white
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
136 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
137 std >$FFB0 set only the first two palettes, B=$00 already
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
138 lda #Bt.Block
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
139 sta >$FFA4 map in the block
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
140
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
141 ldx #$8000 start of the block
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
142 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
143 ldq #Bt.Flag*65536+8
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
144 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
145 ldd #Bt.Flag
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
146 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
147 tst ,s check status : 0(crash) 1(reset) -1(startup)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
148 bmi StoreQ if NOT a crash or reset, start at the start...
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
149 cmpd ,x are they the same?
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
150 beq MoveTxt don't bother clearing the screen if it's there
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
151 StoreQ
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
152 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
153 stq ,x otherwise save the bytes on-screen
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
154 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
155 std ,x
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
156 ldd #8
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
157 std 2,x
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
158 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
159
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
160 leax 8,x point to the start of the screen in memory
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
161 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
162 ldw #$2000-8 clear out the entire block of memory
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
163 leau <L00E0,pcr point to $20, a space
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
164 tfm u,x+ clear out the screen
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
165 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
166 ldy #$2000-8
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
167 ldb #$20
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
168 ClrLoop stb ,x+
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
169 leay -1,y
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
170 bne ClrLoop
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
171 * ldd #$2000-8
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
172 * ldu #$2020
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
173 *ClrLoop stu ,x++
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
174 * subd #$0002
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
175 * bne ClrLoop
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
176 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
177
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
178 MoveTxt leau <L0011,pcr point to OS-9 Welcome Message
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
179 bsr Move1 E=$00 already from TFM above...
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
180 * 0 = crash
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
181 * 1 = reset
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
182 * -1 = startup
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
183 ldb ,s+ check state of boot
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
184 bne L00E2 if OK, continue
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
185 * U=<L0019 already from TFM above (call to L00FD)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
186 bsr Move1 move it on-screen, E=$00 already
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
187 clr >$FF40 turn off disk drives
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
188 L00E0 bra L00E0 loop forever
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
189
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
190 Move1 ldy ,u++ get where to put the text
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
191 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
192 Move ldf ,u+ get the size of the block to move
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
193 L00FD tfm u+,y+
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
194 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
195 Move clra
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
196 ldb ,u+
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
197 tfr d,x
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
198 L00FD lda ,u+
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
199 sta ,y+
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
200 leax -1,x
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
201 bne L00FD
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
202 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
203 rts
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
204
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
205 L0011 fdb ScStart+(BOOTLINE*Width)+((Width-L1)/2)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
206 fcb L1 length of the text below
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
207 T1 equ *
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
208 fcc /NITROS9 BOOT/
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
209 L1 equ *-T1
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
210
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
211 fdb ScStart+((BOOTLINE+2)*Width)+((Width-LFail)/2)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
212 fcb LFail length of the 'FAILED' string
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
213 TFail fcc /FAILED/
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
214 LFail equ *-TFail
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
215
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
216 * saves 2 bytes over leax <L00E2,pc, cmpx #Bt.Start
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
217 L00E2 tfr pc,d get the address at which we're executing
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
218 cmpa #$26 the bootfile starts out at $2600
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
219 bne L0101 if not at $26xx, continue with booting
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
220 ldu #$2600 else move rel, Boot, OS9p1 over
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
221 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
222 ldw #$1200 size of track 34 boot file
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
223 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
224 ldx #$1200
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
225 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
226 ldy #Bt.Start where to put it
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
227 bsr L00FD 1 byte smaller than tfm in place
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
228 jmp >Offset+L0101
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
229
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
230 BtDebug pshs cc,d,x save the register
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
231 orcc #IntMasks turn IRQ's off
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
232 ldb #Bt.Block block to map in
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
233 stb >$FFA0 map the boot screen into block 0
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
234 ldx >$0002 where to put the bytes
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
235 sta ,x+ put the character on-screen
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
236 stx >$0002 save updated address
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
237 clr >$FFA0 map block 0 in again
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
238 puls cc,d,x,pc restore X and exit
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
239
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
240 L0101
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
241 lda #$7E RTS
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
242 sta <D.BtBug
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
243 leax <BtDebug,pc point to debug routine
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
244 stx <D.BtBug+1
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
245
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
246 leau <R.Crash,pcr point to D.Crash, D.CBStart
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
247 ldy #D.Crash move it over
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
248 bsr Move E=$00 from call to L00FD above.
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
249 IFNE H6309
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
250 ldmd #$03 go to native mode, FIRQ saves all registers
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
251 inc <D.MDREG 0+1=1; set MD shadow register (clr'd from above)
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
252 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
253
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
254 * leax <eom,pcr point to the end of REL
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
255 * ldd M$Size,x get size of the next module
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
256 * leax d,x skip Boot, point to OS9p1
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
257 ldx #$F000 we KNOW where OS9p1 starts in memory
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
258 ldd M$Exec,x get execution start address
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
259 jmp d,x jump to it
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
260
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
261 * D.Crash
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
262 R.Crash fcb $10 size of the data to move over
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
263 L003F clr >$FF91 go to map type 0 - called by CC3Go from map 1
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
264 jmp >Offset+crash
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
265
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
266 fcb $00 warm start flag
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
267 fdb $0074 go to $0074, next routine
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
268
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
269 * reset vector: map ROMs out and go to REL in the default DECB block map,
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
270 * which is still block $3F at the top fo memory
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
271 nop required for the ROMs to believe it's a reset vector
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
272 clr >$FFDF go to all RAM mode
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
273 jmp >Offset+reset and re-start the boot
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
274
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
275 Pad fill $39,$127-*
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
276
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
277 ELSE
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
278
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
279 start clr PIA0Base+3
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
280
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
281 IFNE Dragon64
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
282 clr PIA0Base+1 added for Dragon, works on CoCo
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
283 ENDC
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
284
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
285 sta $FFDF turn off ROM
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
286 * locate Boot Text Screen at $8000
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
287 ldb #$06
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
288 ldx #$FFC6
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
289 L262B sta ,x++
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
290 decb
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
291 bne L262B
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
292 sta 1,x
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
293
1727
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
294 IFNE DragonAlpha
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
295 clr $ffc0 * Reset to text mode if Dragon Alpha
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
296 clr $ffc2
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
297 clr $ffc4
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
298
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
299 lda $ff22
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
300 anda #$07
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
301 sta $ff22
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
302 ENDC
78ce0a5ffc8e Incorporated changes and additions made by Phill Harvey-Smith for the
boisy
parents: 1709
diff changeset
303
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
304 * Clear VDG screen
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
305 ldx #ScStart
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
306 ldy #512
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
307 lda #$60
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
308 L263B sta ,x+
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
309 leay -1,y
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
310 bne L263B
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
311
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
312 * Copy "OS9 BOOT" to screen area
1375
805da58aa5b6 Fixed offset
boisy
parents: 1374
diff changeset
313 ldx #ScStart+$10A
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
314 leay <BootMsg,pcr
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
315 ldb #BootMLen
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
316 L2649 lda ,y+
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
317 sta ,x+
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
318 decb
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
319 bne L2649
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
320
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
321 IFNE Dragon64
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
322 tst <$72
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
323 ELSE
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
324 ldd #$1212
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
325 cmpd <$0078
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
326 ENDC
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
327
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
328 beq L266E
1301
4a50c6fb28b2 Fixed problem with copying at Bt.Start
boisy
parents: 1299
diff changeset
329 leau >Begin-XX.Size,pcr
4a50c6fb28b2 Fixed problem with copying at Bt.Start
boisy
parents: 1299
diff changeset
330 ldx #Bt.Size
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
331 ldy #Bt.Start
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
332 L2663 lda ,u+
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
333 sta ,y+
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
334 leax -1,x
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
335 bne L2663
1309
0a04945a7c60 Fixed bug in rel.asm, changed OS-9 Level One Bt.Start to $EE00 and Bt.Size to $1080 due to increased size of boot track using DriveWire booter.
boisy
parents: 1301
diff changeset
336 jmp >Offset+L266E
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
337 L266E leax <eom,pcr
1301
4a50c6fb28b2 Fixed problem with copying at Bt.Start
boisy
parents: 1299
diff changeset
338 ldd M$Exec,x
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
339 jmp d,x
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
340
1374
afe008eb9da1 NitrOS-9 boot message
boisy
parents: 1363
diff changeset
341 BootMsg fcc /NITROSy/
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
342 fcb $60
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
343 fcc /BOOT/
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
344 BootMLen equ *-BootMsg
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
345
1854
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
346 ENDC
59026f50b87f Rolled back changes to rel.asm.
cyouse
parents: 1849
diff changeset
347
1299
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
348 emod
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
349 eom equ *
1f0995cd0431 REL is now back-ported to OS-9 Level One
boisy
parents:
diff changeset
350 end