From: ol.sc
+ + + +/ + + + + + revers @@ -4452,6 +4470,41 @@ the program terminates. +set_irq + + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The stub saves the zero page registers used by the C runtime and switches +to the provided stack area. This means that it is safe to execute C code, +even if C code was interrupted. Be careful however not to call into the C library, +and do not enable stack checks for the handler function or any other function called +from it. + + + + + + setjmp diff --git a/libsrc/common/interrupt.s b/libsrc/common/interrupt.s index 8d4290f3e..574acab55 100644 --- a/libsrc/common/interrupt.s +++ b/libsrc/common/interrupt.s @@ -1,4 +1,4 @@ -; +; ; Oliver Schmidt, 2012-01-18 ; ; void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size); @@ -53,7 +53,7 @@ .proc clevel_irq ; Is C level interrupt request vector set? - lda irqvec+2 ; High byte is enough + lda irqvec+2 ; High byte is enough bne @L1 clc ; Interrupt not handled rts
+ +/ + + +
@@ -4452,6 +4470,41 @@ the program terminates. +set_irq + + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The stub saves the zero page registers used by the C runtime and switches +to the provided stack area. This means that it is safe to execute C code, +even if C code was interrupted. Be careful however not to call into the C library, +and do not enable stack checks for the handler function or any other function called +from it. + + + + + + setjmp diff --git a/libsrc/common/interrupt.s b/libsrc/common/interrupt.s index 8d4290f3e..574acab55 100644 --- a/libsrc/common/interrupt.s +++ b/libsrc/common/interrupt.s @@ -1,4 +1,4 @@ -; +; ; Oliver Schmidt, 2012-01-18 ; ; void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size); @@ -53,7 +53,7 @@ .proc clevel_irq ; Is C level interrupt request vector set? - lda irqvec+2 ; High byte is enough + lda irqvec+2 ; High byte is enough bne @L1 clc ; Interrupt not handled rts
@@ -4452,6 +4470,41 @@ the program terminates.
+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The stub saves the zero page registers used by the C runtime and switches +to the provided stack area. This means that it is safe to execute C code, +even if C code was interrupted. Be careful however not to call into the C library, +and do not enable stack checks for the handler function or any other function called +from it. + + + + + + setjmp diff --git a/libsrc/common/interrupt.s b/libsrc/common/interrupt.s index 8d4290f3e..574acab55 100644 --- a/libsrc/common/interrupt.s +++ b/libsrc/common/interrupt.s @@ -1,4 +1,4 @@ -; +; ; Oliver Schmidt, 2012-01-18 ; ; void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size); @@ -53,7 +53,7 @@ .proc clevel_irq ; Is C level interrupt request vector set? - lda irqvec+2 ; High byte is enough + lda irqvec+2 ; High byte is enough bne @L1 clc ; Interrupt not handled rts
+ +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The stub saves the zero page registers used by the C runtime and switches +to the provided stack area. This means that it is safe to execute C code, +even if C code was interrupted. Be careful however not to call into the C library, +and do not enable stack checks for the handler function or any other function called +from it. + + + +
diff --git a/libsrc/common/interrupt.s b/libsrc/common/interrupt.s index 8d4290f3e..574acab55 100644 --- a/libsrc/common/interrupt.s +++ b/libsrc/common/interrupt.s @@ -1,4 +1,4 @@ -; +; ; Oliver Schmidt, 2012-01-18 ; ; void __fastcall__ set_irq (irq_handler f, void *stack_addr, size_t stack_size); @@ -53,7 +53,7 @@ .proc clevel_irq ; Is C level interrupt request vector set? - lda irqvec+2 ; High byte is enough + lda irqvec+2 ; High byte is enough bne @L1 clc ; Interrupt not handled rts