-
Notifications
You must be signed in to change notification settings - Fork 82
/
lccinit.src
66 lines (47 loc) · 1.65 KB
/
lccinit.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.subttl 'lccinit.src'
.page
; initialization of controller
cntint lda #%01101111 ; data direction
sta ddrb2
and #$ff-$08-$04-$03 ; turn motor off,set phase a, led off
sta dskcnt
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
jmp ptch48 ; *** rom ds 04/10/85 ***
; lda pcr2 ; set edge and latch mode
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
rtch48 and #$ff-$01 ; neg edge please
; ca2: soe output hi disable s.o. into 6502
ora #$0e ; cb1 input only
ora #$e0 ; cb2 mode control r/w
sta pcr2
lda #$41 ; cont irq, latch mode
sta acr2
;--------9/25 rom05-bc-------------
lda #0
sta t1ll2
lda #tim ; / 8 ms /irq
sta t1hl2
sta t1hc2 ; get 6522's attention
;----------------------------------
lda #$7f ; clear all irq sources
sta ier2
lda #$80+$40
sta ifr2 ; clear bit
sta ier2 ; enable irq
lda #$ff ; no current drive
sta cdrive
sta ftnum ; init format flag
lda #$08 ; header block id
sta hbid
lda #$07 ; data block id
sta dbid
lda #<inact
sta nxtst
lda #>inact
sta nxtst+1
lda #200
sta minstp
lda #4
sta as
lda #$4
sta af