14
|
1 ********************************************************************
|
|
2 * Boot - V09 Boot module
|
|
3 *
|
|
4 * $Id: boot_1773.asm,v 1.1.1.1 2001/02/21 23:30:54 boisy Exp $
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8
|
|
9 nam Boot
|
|
10 ttl v09 Boot module
|
|
11
|
24
|
12 ifp1
|
14
|
13 use defsfile
|
24
|
14 endc
|
14
|
15
|
|
16 *
|
|
17 * map extended rom on page 0x40-
|
24
|
18 * first two bytes are extra rom module size
|
14
|
19
|
|
20 tylg set Systm+Objct
|
|
21 atrv set ReEnt+rev
|
|
22 rev set $01
|
|
23 edition set 1
|
|
24
|
|
25 mod eom,name,tylg,atrv,start,size
|
|
26
|
|
27 size equ .
|
|
28
|
|
29 name fcs /Boot/
|
|
30 fcb edition
|
|
31
|
15
|
32 start
|
37
|
33 lbra entry
|
38
|
34 lbra btdebug
|
37
|
35 entry
|
24
|
36 ldy #$40 extended rom page no.
|
15
|
37 clra
|
|
38 clrb
|
|
39 pshs d,x,y,u
|
|
40 tfr d,x
|
|
41 leay 4,s pointer to page no
|
|
42 ** read boot rom file size
|
|
43 os9 F$LDDDXY
|
14
|
44 bcs last
|
27
|
45 addb #$ff
|
|
46 adca #0
|
|
47 clrb
|
16
|
48 std ,s size return as d
|
30
|
49 ** OS9 lv2 use $a000-$dfff as a temporary page
|
|
50 ** demand at least that size ( ROM start at $ed00 )
|
|
51 cmpa #$ed-$a0
|
|
52 bhi ok
|
|
53 lda #$ed-$a0
|
|
54 ok
|
15
|
55 os9 F$BtMem
|
14
|
56 bcs last
|
15
|
57 ** u points the memory
|
|
58 stu 2,s return as x
|
|
59 ldd ,s
|
35
|
60 std 6,s
|
15
|
61 ldx #0
|
24
|
62 ** copy to Bt BtRAM
|
35
|
63 pagel ldd #$2000
|
|
64 cmpd 6,s
|
|
65 blo lo
|
|
66 ldd 6,s
|
|
67 lo tfr d,y
|
15
|
68 lda 5,s
|
|
69 sta $ffa0
|
|
70 tfr y,d
|
|
71 loop ldy ,x++
|
|
72 sty ,u++
|
35
|
73 subd #2
|
|
74 bne loop
|
24
|
75 clr $ffa0 back to system map
|
35
|
76 ldd 6,s
|
|
77 subd #$2000
|
|
78 bmi last all transfered
|
|
79 std 6,s
|
15
|
80 ** 2k boundary
|
|
81 inc 5,s
|
|
82 ldx #0
|
|
83 bra pagel
|
|
84 last clr $ffa0
|
|
85 puls d,x,y,u,pc
|
14
|
86
|
37
|
87 ** put lbsr btdebug on <$5e
|
|
88 btdebug anda #$7f
|
|
89 sta $ff81
|
|
90 rts
|
|
91
|
14
|
92 emod
|
|
93 eom equ *
|
|
94 end
|