From: <ha...@hu...> - 2007-04-29 07:02:08
|
Hi, I am trying to port my timer interrupt driven display code to amforth-1.9 and have some problems with that. On the documentation page (http://amforth.sourceforge.net/interrupts.php), an example interrupt handler is printed: : doint1 . ( <-- this is dangerous in interrupts ) ; The danger set aside (I guess the dangerous part is the fact that the UART will generate another interrupt that may not be properly handled), it seems that this example has a stack effect. Is this intended? Is there something on the stack that the interrupt handler must remove? I am asking because my code crashes - If I leave the stack as it was before entering the interrupt handler, I see periodic reboots (once a second) when I enable the interrupt handler. If I pop the topmost item, amforth plain crashes with trash characters written to the console. It could be that the new interrupt handler code is too slow to work with the timer interrupt, but before getting into debugging that, I'd like to know if there is something fundamentally wrong with my code. BTW: Is there anything in amforth except ISTORE that writes to flash? I am asking because I want to give amforth on a flashless AVR a try. Thanks! -Hans |