annotate level1/modules/rominfo.asm @ 1071:853a796a1bcd

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