forked from jkotlinski/durexforth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcart.asm
More file actions
70 lines (62 loc) · 1.1 KB
/
cart.asm
File metadata and controls
70 lines (62 loc) · 1.1 KB
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
67
68
69
70
!cpu 6510
!ct raw
!to "build/cart.bin", plain ; set output file and format
* = $8000
!word coldstart ; coldstart vector
!word warmstart ; warmstart vector
!byte $C3,$C2,$CD,$38,$30 ; "CBM80". Autostart string
coldstart
sei
stx $d016
jsr $fda3 ;Prepare IRQ
; init system constants ($fd50)
lda #0
tay
- sta 2,y
sta $200,y
sta $300,y
iny
bne -
lda #4
sta $288
jsr $fd15 ;Init I/O
jsr $ff5b ;Init video
warmstart
sei
lda #<durexforth_bin
sta $8b
lda #>durexforth_bin
sta $8c
lda #8
sta $8e
sta $ba ; last device
lda #$1
sta $8d
ldy #0
-
lda ($8b),y
sta ($8d),y
iny
lda ($8b),y
sta ($8d),y
iny
lda ($8b),y
sta ($8d),y
iny
lda ($8b),y
sta ($8d),y
iny
bne -
inc $8c
inc $8e
lda $8c
cmp #$c0
bne -
cli
ldx #0
lda $de00 ; $a000-$bfff = RAM (Simons' basic)
jmp $80d
durexforth_bin
!binary "build/durexforth",,$2
* = $bfff ; fill up to -$9fff (or $bfff if 16K)
!byte 0