-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame_over.s
More file actions
63 lines (57 loc) · 767 Bytes
/
Copy pathgame_over.s
File metadata and controls
63 lines (57 loc) · 767 Bytes
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
.include "constants.inc"
.segment "ZEROPAGE"
.importzp player_x, player_y, explosion_frames
.segment "CODE"
.import main
.export end_game
.proc end_game
; save registers
PHP
PHA
TXA
PHA
TYA
PHA
LDA #$00
STA $0211
STA $0215
STA $0219
STA $021d
STA $0212
STA $0216
STA $021a
STA $021e
STA $0210
STA $0213
STA $0214
STA $0217
STA $0218
STA $021b
STA $021c
STA $021f
STA $0201
STA $0205
STA $0209
STA $020d
STA $0202
STA $0206
STA $020a
STA $020e
STA $0200
STA $0203
STA $0204
STA $0207
STA $0208
STA $020b
STA $020c
STA $020f
end:
; restore registers and return
PLA
TAY
PLA
TAX
PLA
PLP
RTS
.endproc