1. The interrupt system is severely broken.
When an IRQ occurs and IRQ_vec is called in min_mon.asm the interrupt is only
registered with IRQbase but the interrupt source is not serviced nor is the
interrupt disable bit set at RTI. As a consequence the interrupt is immediately
called again and again and IRQbase is trashed until the interrupt is serviced
by the ON IRQ handler in basic.
The problem is discussed in
viewtopic.php?f=5&t=2411How I solved the problem for my emulator:
https://github.com/Klaus2m5/AVR_emulate ... er/EhBASICHowever, you should keep in mind that the interrupt service capacity in EhBASIC
is very limited. In a 2MHz system more than 100 interrupts per second or
interrupts requiring less than 10ms service time should be handled in machine
language. The numbers are worse if the interrupt handler gets more complex.
Of course, a hybrid solution is always possible. You could service the interrupt
in machine language and flag an interrupt to basic only after a buffer is
filled/emptied or a count is reached.