mirror of
https://github.com/jeremysrand/apple2048.git
synced 2024-06-08 21:29:30 +00:00
Use the volatile keyword with all inline assembly to make sure the optimizer doesn't remove it.
This commit is contained in:
parent
209b1ef23e
commit
74cf2775f1
Binary file not shown.
|
@ -70,7 +70,7 @@ SRCDIRS+=
|
||||||
|
|
||||||
# If you want to add arguments to the compile commandline, add them
|
# If you want to add arguments to the compile commandline, add them
|
||||||
# to this variable:
|
# to this variable:
|
||||||
CFLAGS += -Oi
|
CFLAGS += -O
|
||||||
|
|
||||||
# If you want to add arguments to the assembly commandline, add them
|
# If you want to add arguments to the assembly commandline, add them
|
||||||
# to this variable:
|
# to this variable:
|
||||||
|
|
Binary file not shown.
|
@ -33,7 +33,7 @@ void playSound(int8_t freq, int16_t duration)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (duration > 0) {
|
while (duration > 0) {
|
||||||
asm ("STA %w", 0xc030);
|
asm volatile ("STA %w", 0xc030);
|
||||||
while (freq > 0) {
|
while (freq > 0) {
|
||||||
freq--;
|
freq--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user