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

Allen Huffman alsplace at pobox.com
Sat Jun 18 12:42:31 EDT 2022


> 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




More information about the Coco mailing list