NYYRIKKI wrote:
>
> I know, that I have only questions, that nobody can answer, but I'm trying
> my luck once again...
>
> I make proggram like :
>
> IN A,(#A8)
> PUSH AF
> LD A,(#FFFF)
> CPL
> PUSH AF
> LD A,XXX
> OUT (#A8),A
> LD A,YYY
> LD (#FFFF),A
> .
> .
> .
> POP AF
> LD (#FFFF),A
> POP AF
> OUT (#A8),A
>
> C R A S H ! ! ! Why ????????? (Do I have to wait or something ???)
>
Do you running this on Turbo R? AFAIK, it has both slot-0 and slot-3
expanded.
And since each primary slot has its own slot SSlot select register
(located at
#FFFF in THIS slot) you need to select the slot of your choice in page-3
before
writing to FFFF
so a really paranoid routine should look like this:
disable interrupts (!)
save #A8
save #ffff
select destination slot in page-3 (take care of stack and your program
must be below #C000)
save #ffff
write #ffff with destination secondary slot map
restore #A8 (!)
write #A8 with new primary slot map
(your stuff inserted here)
select destination slot in page-3
restore #ffff
restore #A8 to original state
restore original #ffff
enable interrupts
voila!
Take care of the interrupts all the way and also look where your
stack pointer is.
****
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/)
****