-
Notifications
You must be signed in to change notification settings - Fork 2
/
messages.asm
100 lines (81 loc) · 1.56 KB
/
messages.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.include "header.inc"
.include "misc_macros.inc"
.include "zeropage.inc"
.include "text.inc"
.bank 0 slot 1
.section "messages code/data"
.define MSG_X 3
.define MSG_Y 25
_str_good_luck: .db "GOOD LUCK!",0
_str_solving: .db "SOLVING...",0
_str_cancelled: .db "CANCELLED",0
_str_well_done: .db "WELL DONE!",0
_str_done: .db "DONE!",0
_str_cannot_erase: .db "CANNOT ERASE THIS",0
_str_cannot_write: .db "CANNOT WRITE THIS HERE",0
_str_void: .db " ",0
_str_sole_candidate: .db "SOLE CELL CANDIDATE",0
_str_unique_row_candidate: .db "UNIQUE ROW CANDIDATE",0
_str_unique_column_candidate: .db "UNIQUE COLUMN CANDIDATE",0
_str_nothing_easy_found: .db "NOTHING EASY FOUND...",0
.macro SAY
pushall
XY16
ldx #MSG_X
ldy #MSG_Y
jsr text_gotoxy
ldy #\1
jsr text_print
popall
.endm
_clear:
SAY _str_void
rts
msg_clear:
jsr _clear
rts
msg_say_solving:
jsr _clear
SAY _str_solving
rts
msg_say_cancelled:
jsr _clear
SAY _str_cancelled
rts
msg_say_done:
jsr _clear
SAY _str_done
rts
msg_say_well_done:
jsr _clear
SAY _str_well_done
rts
msg_say_cannot_erase:
jsr _clear
SAY _str_cannot_erase
rts
msg_say_cannot_write:
jsr _clear
SAY _str_cannot_write
rts
msg_say_good_luck:
jsr _clear
SAY _str_good_luck
rts
msg_say_sole_canditate:
jsr _clear
SAY _str_sole_candidate
rts
msg_say_unique_row_canditate:
jsr _clear
SAY _str_unique_row_candidate
rts
msg_say_unique_column_canditate:
jsr _clear
SAY _str_unique_column_candidate
rts
msg_say_nothing_easy_found:
jsr _clear
SAY _str_nothing_easy_found
rts
.ends