mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-06-08 00:29:29 +00:00
email.c: Turn off optimizer for inline asm
This commit is contained in:
parent
d015ca310c
commit
7bb47d4b85
23
apps/email.c
23
apps/email.c
|
@ -925,6 +925,21 @@ void sanitize_filename(char *s) {
|
||||||
|
|
||||||
enum aux_ops {FROMAUX, TOAUX};
|
enum aux_ops {FROMAUX, TOAUX};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Asm code for copyaux()
|
||||||
|
*/
|
||||||
|
#pragma optimize (push, off)
|
||||||
|
void copyauxasm(enum aux_ops dir) {
|
||||||
|
if (dir == TOAUX)
|
||||||
|
__asm__("sec"); // Copy main->aux
|
||||||
|
else
|
||||||
|
__asm__("clc"); // Copy aux->main
|
||||||
|
__asm__("sta $c000"); // Turn off 80STORE
|
||||||
|
__asm__("jsr $c311"); // AUXMOVE
|
||||||
|
__asm__("sta $c001"); // Turn on 80STORE
|
||||||
|
}
|
||||||
|
#pragma optimize (pop)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Aux memory copy routine
|
* Aux memory copy routine
|
||||||
*/
|
*/
|
||||||
|
@ -935,13 +950,7 @@ void copyaux(char *src, char *dst, uint16_t len, enum aux_ops dir) {
|
||||||
*a1 = src;
|
*a1 = src;
|
||||||
*a2 = src + len - 1; // AUXMOVE moves length+1 bytes!!
|
*a2 = src + len - 1; // AUXMOVE moves length+1 bytes!!
|
||||||
*a4 = dst;
|
*a4 = dst;
|
||||||
if (dir == TOAUX)
|
copyauxasm(dir);
|
||||||
__asm__("sec"); // Copy main->aux
|
|
||||||
else
|
|
||||||
__asm__("clc"); // Copy aux->main
|
|
||||||
__asm__("sta $c000"); // Turn off 80STORE
|
|
||||||
__asm__("jsr $c311"); // AUXMOVE
|
|
||||||
__asm__("sta $c001"); // Turn on 80STORE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user