[Coco] EDITEX (A better edit for coco3.rom)

Albert Stinger albertstinger24 at canada.com
Sat Mar 26 10:08:14 EST 2005


Hi all,

I can't believe how EDITEX patched into the roms so nice.
It's like it was meant to be there. Take a look and see
how EDITEX uses up the unused portions in a coco3.rom.

***************************************************************************
* EDIT - if you enter EDIT [LINE NUMBER] in the CONSOLE you come here.
*
* A/NO
* 8533               00100         ORG     $8533
* 8533 BD   A064     00110 START   JSR     $A064
*           0000     00120         END
*
* 00000 TOTAL ERRORS
*
* START   8533
*
***************************************************************************
* To use the enhanced edit command enter EDITEX from the OK prompt in BASIC
* The checking for enhanced edit command This code will be patched
* into the memory starting at $A064 - $A071 which is 12 bytes.
*
* A/NO
* A064               00100         ORG     $A064
* A064 BD   AF67     00110 START   JSR     $AF67
* A067 24   03       00120         BCC     CHKED
* A069 7E   89AE     00130         JMP     $89AE
* A06C 32   64       00140 CHKED   LEAS    $04,S
* A06E C6   01       00150         LDB     #1
* A070 20   17       00160         BRA     $A089
*           0000     00170         END
*
* 00000 TOTAL ERRORS
*
* CHKED   A06C
* START   A064
*
***************************************************************************
* To use the enhanced edit command enter EDITEX from the OK prompt in BASIC
* The checking for enhanced edit command This code will be patched
* into the memory starting at $A089 - $A092 which is 10 bytes.
*
* A/NO
* A089               00100         ORG     $A089
* A089 F7   FF90     00110 START   STB     $FF90
* A08C F7   FFDF     00120         STB     $FFDF
* A08F 7E   C405     00130         JMP     $C405
*           0000     00140         END
*
* 00000 TOTAL ERRORS
*
* START   A089
*
***************************************************************************
* To use the enhanced edit command enter EDITEX from the OK prompt in BASIC
* The checking for enhanced edit command This code will be patched
* into the memory starting at $C405 - $DFFF which is 7162 bytes.
*
        ORG $C405       * PATCH $C405-$DFFF
EDITEX  ANDA #$DF       * MAKE UPPER CASE
        CMPA #'E        * SYNTAX CHECK
        BEQ CHK2        * OK
CHK1    JMP $B277       * SYNTAX ERROR
CHK2    JSR $009F       * GET NEXT INPUT
        ANDA #$DF       * MAKE UPPER CASE
        CMPA #'X        * SYNTAX CHECK
        BNE CHK1        * SYNTAX ERROR EXIT WITH ERROR MESSAGE

After the syntax check will be the entry point for the new edit commands.
My vision is it will have these commands:

    1. Arrows Keys - Lets you scroll through the BASIC program in memory.
    2. Insert           - Lets you insert characters at current cursor 
position.
    3. Over-Strike   - Lets you replace characters at current cursor 
position.
    4. EDIT            - Lets you use the EDIT command on current line 
number.
    5. QUIT            - Quits EDITEX

Another interesting tidbit about EDITEX. When you press CTRL and ALT during 
RESET
the picture that you'll see is the bytes for EDITEX. It should be 
interesting to see what
the picture for EDITEX will look like. My guess is it could be anything. Who 
knows maybe
it'd be a picture of Jesus Christ or the Virgin Mary. Who knows could be 
anything?

Albert Stinger






More information about the Coco mailing list