0
|
1 ********************************************************************
|
|
2 * ROMInfo - OS-9 Level One ROM boot module
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * ROM Relocation code for OS-9 Level One Vr. 2.00
|
|
7 * Executed at $8015 from ROM
|
|
8 *
|
|
9 * Ed. Comments Who YY/MM/DD
|
|
10 * ------------------------------------------------------------------
|
201
|
11 * 1 Created BGP 98/05/03
|
0
|
12
|
|
13 nam ROMInfo
|
|
14 ttl OS-9 Level One ROM boot module
|
|
15
|
|
16 ifp1
|
|
17 use defsfile
|
|
18 endc
|
|
19
|
|
20 tylg set Systm+Objct
|
|
21 atrv set ReEnt+rev
|
|
22 rev set $01
|
201
|
23 edition set 1
|
0
|
24
|
|
25 mod eom,name,tylg,atrv,start,size
|
|
26
|
|
27 size equ .
|
|
28
|
|
29 name fcs /ROMInfo/
|
|
30 fcb edition
|
|
31
|
|
32 start equ *
|
|
33 CCInit ldx #PIA.U8 PIA1
|
|
34 clr -3,x clear PIA0 Control Register A
|
|
35 clr -1,x clear PIA0 Control Register B
|
|
36 clr -4,x set PIA0 side A to input
|
|
37 ldd #$FF34
|
|
38 sta -2,x set PIA0 side B to output
|
|
39 stb -3,x enable PIA0 peripheral reg, disable PIA0
|
|
40 stb -1,x MPU interrupts, set CA2, CA1 to outputs
|
|
41 clr 1,x $FF20 = DDR, motoroff
|
|
42 clr 3,x $FF22 = DDR, sound disabled
|
|
43 deca A = $FE after deca
|
|
44 sta ,x bits 1-7 are outputs, bit 0 is input on PIA1 side A
|
|
45 lda #$F8
|
|
46 sta 2,x bits 0-2 are inputs, bits 3-7 are outputs on B side
|
|
47 stb 1,x enable peripheral registers, disable PIA1 MPU
|
|
48 stb 3,x interrupts and set CA2, CB2 as outputs
|
|
49 clr 2,x set 6847 mode to alphanumeric
|
|
50 ldb #$02
|
|
51 stb ,x make RS-232 output marking
|
|
52 clrb
|
|
53 tfr b,dp B = 0
|
|
54 ldb #$04
|
|
55 clr -2,x
|
|
56 bitb 2,x
|
|
57
|
|
58 lda #$37
|
|
59 sta PIA.U8+3
|
|
60
|
|
61 lda PIA.U4+3
|
|
62 ora #$01
|
|
63 sta PIA.U4+3
|
|
64
|
|
65 lda PIA.U8+2
|
|
66 anda #$07
|
|
67 sta PIA.U8+2
|
|
68
|
|
69 * VDG Mode
|
|
70 sta $FFC0
|
|
71 sta $FFC2
|
|
72 sta $FFC4
|
|
73
|
|
74 * 64K DRAM (M0=0, M1=1)
|
|
75 sta $FFDA RESET M0
|
|
76 sta $FFDD SET M1
|
|
77
|
|
78 * ROM relocation code -- copies the boot track into $2600
|
|
79 RelROM ldx #$AE00 src address (ROM)
|
|
80 ldy #$2600 dst address (RAM)
|
|
81 copyloop ldd ,x++ get 2 bytes from src
|
|
82 std ,y++ put 2 bytes to dst
|
|
83 cmpx #$AE00+$1200 at end?
|
|
84 blo copyloop nope, copy more...
|
|
85 * BOOT relocation code -- copies the bootfile into $2600+$1200
|
|
86 RelBOOT ldx #$8000
|
|
87 ldy #$2600+$1200
|
|
88 cpy2loop ldd ,x++
|
|
89 std ,y++
|
|
90 cmpx #$8000+$2E00
|
|
91 blo cpy2loop
|
|
92 jmp $2602 jump to OS rel code
|
|
93
|
|
94 emod
|
|
95 eom equ *
|
|
96 end
|