[Coco] Color BASIC BREAK CHECK RAM hook ($17c)
Arthur Flexser
flexser at fiu.edu
Sat Jun 18 14:48:01 EDT 2022
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
>
More information about the Coco
mailing list