mirror of
https://github.com/jeremysrand/a2sudoku.git
synced 2024-06-06 12:29:29 +00:00
Use the volatile keyword with all inline assembly to make sure the optimizer does not discard it.
This commit is contained in:
parent
beb9d2666f
commit
75f85b94e8
Binary file not shown.
Binary file not shown.
|
@ -50,7 +50,7 @@ tPuzzle thePuzzle;
|
||||||
void fileReadProblem(char *filename)
|
void fileReadProblem(char *filename)
|
||||||
{
|
{
|
||||||
clrscr();
|
clrscr();
|
||||||
asm ("STA %w", 0xc051);
|
asm volatile ("STA %w", 0xc051);
|
||||||
printf("\n\nUnable to read file %s\nPress any key to quit", filename);
|
printf("\n\nUnable to read file %s\nPress any key to quit", filename);
|
||||||
cgetc();
|
cgetc();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -201,13 +201,13 @@ void shutdownUI(void)
|
||||||
void textMode(void)
|
void textMode(void)
|
||||||
{
|
{
|
||||||
clrscr();
|
clrscr();
|
||||||
asm ("STA %w", 0xc051);
|
asm volatile ("STA %w", 0xc051);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void graphicsMode(void)
|
void graphicsMode(void)
|
||||||
{
|
{
|
||||||
asm ("STA %w", 0xc050);
|
asm volatile ("STA %w", 0xc050);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user