Enlarge SDCC's stack

Pagina 4/4
1 | 2 | 3 |

Van Marq

Champion (387)

afbeelding van Marq

06-02-2015, 23:57

By the way, there are macros DI and EI in interrupt.h, so no need to reimplement them like above.

#define DI __asm di __endasm
#define EI __asm ei __endasm

They are often timing critical, too, so better not turn them into slow functions.

Van ARTRAG

Enlighted (6891)

afbeelding van ARTRAG

07-02-2015, 14:15

From what I see HiTech C v7.8 is more advanced than sdcc in some aspects:
- parameters are aways passed in b c d e and on the stack only if needed
- Out() Otir() and other i/o functions are in a native library implemented in line opcodes
- memset and memcpy are inlined using ldir (not sure here if sdcc doesn't do the same)

Pagina 4/4
1 | 2 | 3 |