4 ms·
Calling the interrupt routine to play a sound sample used the stack, hence wrote register contents (and return addresses upon subroutine calls within the handle
by pflanze 13y ago
Calling the interrupt routine to play a sound sample used the stack, hence wrote register contents (and return addresses upon subroutine calls within the handlers) onto the tile target. No problem, as while the interrupt routine was running, the normal program was stopped. After returning from the interrupt, the stack pointer would be reset to the original value, and the normal program would go on overwriting the locations that had just been used for the interrupt handler stack. Playing the audio would not be disturbed at all. (This assumes that the stack wraps around at the end. Actually, there was probably still image corruption happening, if the irq was triggered at the very end of the stack range. Except perhaps the stack size was 16bit?)
Edit: yes, the stack pointers were 16 bit (http://en.wikipedia.org/wiki/Motorola_6809 http://en.wikipedia.org/wiki/Motorola_6809).
- tmoertel 13y agoYou have a quick mind to spot that edge case! See footnote 2 of the article for how we handled it.