[Coco] Color BASIC BREAK CHECK RAM hook ($17c)

Arthur Flexser flexser at fiu.edu
Sat Jun 18 19:53:05 EDT 2022


Agreed, my bad.

Art

On Sat, Jun 18, 2022 at 4:21 PM Christopher R. Hawks <chawks at dls.net> wrote:

> On Sat, 18 Jun 2022 14:48:01 -0400
> Arthur Flexser via Coco <coco at maltedmedia.com> wrote:
>
> > Looks to me like what's being bypassed isn't what you intend.
> >
> > Your code does the INC $400, then the regular break check processing
> > (JMP SAVEDVEC), which ends in an RTS, taking you back to the LEAS 2,S
> > that you patched in..  Then you purge the next deeper RTS from the
> > stack, bypassing some entirely different ROM code.  If you wanted it
> > to INC $400 and then return immediately, bypassing normal break key
> > processing, you should just put an RTS after the INC $400 and not
> > bother saving the old vector.
> >
> > Art.
> >
> > On Sat, Jun 18, 2022 at 12:43 PM Allen Huffman via Coco <
> > coco at maltedmedia.com> wrote:
> >
> > > > On Jun 17, 2022, at 12:00 AM, Arthur Flexser via Coco <
> > > coco at maltedmedia.com> wrote:
> > > >
> > > > Did you change RVEC from $167 to the break key hook?  Your
> > > > listing shows
> > > it
> > > > as $167 still.
> > > >
> > > > Art
> > >
> > >
> > > Oops - looks like I pasted the same thing twice.  Here is my
> > > NOBREAK.ASM attempt. If it’s something super obvious like that, I’d
> > > be quite happy.
> > >
> > >
> > > * lwasm nobreak.asm -fbasic -onobreak.bas --map
> > >
> > > RVEC11 equ $17f      break check RAM hook
> > >
> > >     org $3f00
> > >
> > > init
> > >     lda RVEC11      get op code
> > >     sta savedrvec   save it
> > >     ldx RVEC11+1    get address
> > >     stx savedrvec+1 save it
> > >
> > >     lda #$7e        op code for JMP
> > >     sta RVEC11      store it in RAM hook
> > >     ldx #newcode    address of new code
> > >     stx RVEC11+1    store it in RAM hook
> > >
> > >     rts             done
> > >
> > > newcode
> > >     inc $400        inc top left byte of 32-col screen
> > > savedrvec rmb 3     call regular RAM hook
> > >     leas $02,S      remove PC from stack
> > >     rts             return back, skipping.
> > >
> > >
> > > --
> > > Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227
> > > (vmail/TXT only)
> > > http://www.subethasoftware.com -
> > > https://www.facebook.com/subethasoftware
> > >
> > >
> > >
> > > --
> > > Coco mailing list
> > > Coco at maltedmedia.com
> > > https://pairlist5.pair.net/mailman/listinfo/coco
> > >
> >
>
>     I have to differ, Art. If the saved vector starts with JMP, the
> code will NOT come back to the LEAS 2,s. JMP does not save a return
> address on the stack. So the code will RTS back to the code that called
> JSR $017f (and placed a return address on the stack).
>
>     Allen's code needs to change the JMP to a JSR. (And do the right
> thing if DECB is missing, $17f contains an RTS.)
>
>
>
> Christopher R. Hawks
> HAWKSoft
> --
> "The leader of Jamestown was "John Smith" (not his real name), under
> whose direction the colony engaged in a number of activities, primarily
> related to starving.            -- Dave Barry, "Dave Barry Slept
> Here" ----------------------------------------
>        \   ^__^
>         \  (oo)\_______
>            (__)\       )\/\
>                ||----w |
>                ||     ||
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list