Well, time to ask for help again. Now I have a very strange problem with
InterNestor suite: I discovered that if after installing it I start to
access the floppy disk drive (just a loop with infinite DIRs), after
some iterations (sometimes 3, sometimes 30) the computer hangs. It
happens only with the diskette, not with the hard disk!!

I simplified the InterNestor resident program to the point that when it
is called it just does a RET, so the problem is for sure in the calling
routine, which is integrated in NestorMan and is executed in each timer
interrupt. What this routine (resident in page 3) does is:

- DI
- If a variable named INT_IN_PROGRESS is 1, do nothing and return.
Otherwise set it to 1, EI and continue.
- Obtain the slot currently connected on page 1, save it as OLDSLOT
- Put the InterNestor slot on page 1 with ENASLT
- Obtain the segment currently connected on page 1 with GET_P1, save it
as OLDSEG
- Put the InterNestor segment on page 1 with PUT_P1
- Call the InterNestor interrupt entry point on #4009 (as said before,
just a RET here currently for debugging)
- Restore OLDSLOT to page 1
- Restore OLDSEG to page 1
- Set INT_IN_PROGRESS to 0 and finish

And the routine for obtaining the slot currently switched on page 1 is:

- DI
- Obtain the slot, S, from bits 2 and 3 of the value read from port #A8.
- If the slot is not expanded according to #FCC1+S, EI and return S.
Otherwise continue.
- Obtain the subslot SL from bits 2 and 3 of #FCC5+S
- EI 
- Return S+4*SL+#80

I think I do all correctly! So where is the problem? The only thing I
can think of, is that the disk driver BIOS routine performs some slot
switching without actually updating the value of #FCC5+S. But this is
illegal, so it is possible that a BIOS routine do it??

And the worst part is that I can't obtain the connected subslot number
by switching the slot in page 3 and reading address #FFFF, because the
program itself resides in page 3... argh!


*** XX BARCELONA MSX USERS MEETING: DECEMBER 8TH, 2001 ***
------------------------------------------------------------------------------------------------------
                Konami Man  -  AKA Nestor Soriano (^ ^)v
                       Itsumo MSX user

                             [EMAIL PROTECTED]
                               http://www.konamiman.com

                 Kyoko Koizumi home page (under construction):
             http://www.geocities.com/tamachan1976/index.html
------------------------------------------------------------------------------------------------------

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to