-
Notifications
You must be signed in to change notification settings - Fork 1
/
start_wait.asm
63 lines (41 loc) · 1002 Bytes
/
start_wait.asm
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
var_start: .fill 1,0
.var start_game = var_start
start_text:
.text "press h to start"
ins_text:
.text " keys: w a o l "
wait_for_key:
sei //deactivate system interrupts
lda #%11111111 // CIA#1
sta $dc02
lda #%00000000 // CIA#2
sta $dc03
lda #%11110111
sta $dc00
ldy #16 //length of text
load_start_msg:
dey
php //push status registers onto the stack
lda start_text,y //this loop transfers the contents of
sta $07A4,y //the start_text text into the screen ram
plp //pull status registers, in order to get whether dey
//was equal to zero
bne load_start_msg
repeat_2:
lda $dc01
and #%00100000
bne repeat_2 // wait for key "H"
lda #1
sta var_start
ldy #16 //length of text
jsr load_ins_msg
cli // set interrupts
rts // return
load_ins_msg: //see load_start_msg above
dey
php
lda ins_text,y
sta $07A4,y
plp
bne load_ins_msg
rts