On Thu, 25 Mar 1999, Jeroen Smael wrote:

> Nestor Soriano wrote:
> > Hi people... problems again... this time, when changing stack. In a new
> > update of NestorAcentos I'm developing, I put the following piece of code
> > attached to the timer interrupt hook. The code is placed in a reserved zone
> > on page 3:
> > 
> > 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?
> > 
> > Thanx!
> 
> Hi Nestor,
> 
> Perhaps a stupid remark, but do you call this routine or do you jump to
> it? If you call it, the JP at the end causes your problem. If you jump
> to this routine, I don't see anything wrong with it (somebody else?).

hmm.. it is just the other way around; if he CALLs it, it is ok because
the old_interrupt_hook RETurns.

Do you perform BDOS routines during your interrupt Nestor? And do you use
it in DOS1 or DOS2 environment?

Also stupid: don't forget to push/pop IX/IY and shadowregisters.

Greetz,
jon


****
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