On Wed, 24 Mar 1999, Nestor Soriano wrote:

> ld (SAVESP),sp
> ld sp,NEWSP+100
> push all
> .
> . (changes slot and segment on page 2, do stuff and restores old status)
> .
> pop all
> ld sp,(SAVESP)
> jp old interrupt hook
> 
> SAVESP: dw 0
> NEWSP:  ds 100
> 
> Well, a program executing such code causes the system to crash when any
> other program is executed. Someone knows where is the problem?

You had some hints of what the problem most probably could be. I give you
one more, but I don't think you made this mistake: push all and pop all
must be in reversed order, this is correctly done?

Most probably you get an interrupt while your routine is working. If that
happens only once, the system will hang. You can switch them off with
vdp(1), so you're sure there'll be really no interrupts, even if some
routine might switch them on. This is not really safe, though, since other
devices might give interrupts as well, like the gfx9000. So just make sure
they're not switched on is the safest.
If you disable the bios, don't forget to read vdp status register 0 to
reset the interrupt.

Bye,
shevek

---
Visit the internet summercamp via http://polypc47.chem.rug.nl:5002


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to