[Coco] ML Question: MMU Block Switching

William Mikrut wmikrut72 at gmail.com
Mon Feb 16 23:13:43 EST 2015


No I did not.... one of many mistakes... relocating the stack.

I am so surprised on how I have spent many, many years programming on
modern systems from IBM to Android.... yet the 8 bit world seems to trip me
up.

Thank you for your response!


On Mon, Feb 16, 2015 at 8:38 PM, Arthur Flexser <flexser at fiu.edu> wrote:

> Have you got your stack somewhere safely out of the way of the MMU
> switching?   The stack really doesn't like it when it finds itself suddenly
> switched out of the memory map.
>
> Art
>
> On Mon, Feb 16, 2015 at 7:32 PM, William Mikrut <wmikrut72 at gmail.com>
> wrote:
>
> > I do have a another ML question about memory block switching.
> > When processing I will have a controlling program setup at $1200
> >
> >         orcc     #$50    Interrupts off
> > lda $ffa1     Load current page
> > anda   #63
> > pshs a           Push for later
> > lda #$36 Map in Hi-res Text
> > sta $ffa1     Tell MMU to switch page
> > andcc  #$ef      Interrupts on
> >
> > Now I can manipulate data in $2000-$3FFF and essentially display text on
> > the hi-res text screen.
> >
> > When I am done and ending the program I cleanup with this:
> >         orcc #$50
> > puls a
> > sta $ffa1
> > andcc  #$ef
> >
> > Is there any reason that would cause a program fault while my lower
> memory
> > program is operating and the MMU is set to map in page 36 to $2000-$3FFF?
> >
> > My lower memory program is no where near $2000 in ending size.
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
> >
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list