No ROM replacement needed for this... but it's not a lot faster.
It uses the same patch to the CHRGET function on the direct page used in the the latest ROM.
The patch will be embedded in the REM in line 0 after the first run.
Then delete lines 9998-10000 and move the EXEC to line 1 in place of the GOSUB and save it.
It will already be embedded in the REM and there's no need to read/poke the data again.
The patch is actually resident in RAM on the direct page until you turn off the machine or it crashes.
BASIC code:
0 REM012345678901234567890123456789012345
1 GOSUB 10000
9998 DATA 60,54,55,206,67,101,236,1,221,246,236,3,221,248,236,5,221,250,236,7,221,252
9999 DATA 51,50,56,57,240,129,58,37,1,57,126,225,204
10000 FORI=0TO34:READ A:POKE 17227+I,A:NEXT:EXEC17227:RETURN
And the assembly for the TASM cross assembler:
; Simple speed up for MC-10 Microcolor BASIC
; (C)2018 James Diffendaffer
; May be freely redistributed
.MSFIRST ; Most Significant byte first
#define EQU .EQU
#define ORG .ORG
#define RMB .BLOCK
#define FCB .BYTE
#define FCC .TEXT
#define FDB .WORD
#define END .END
#define FCS .TEXT
#define equ .EQU
#define org .ORG
#define rmb .BLOCK
#define fcb .BYTE
#define fcc .TEXT
#define fdb .WORD
#define end .END
#define fcs .TEXT
org $434B
pshx
psha
pshb
ldx #PATCH
ldd 1,X
std $F6
ldd 3,x
std $F8
ldd 5,x
std $FA
ldd 7,x
std $FC
pulb
pula
pulx
rts
PATCH
FCB $F0
org $00F6
cmpa #':' ; set Z flag if statement separator
bcs AA ; perform more tests if not
rts ; return if >= ':'
AA jmp $E1CC ; jump to the parser back end
end
It uses the same patch to the CHRGET function on the direct page used in the the latest ROM.
The patch will be embedded in the REM in line 0 after the first run.
Then delete lines 9998-10000 and move the EXEC to line 1 in place of the GOSUB and save it.
It will already be embedded in the REM and there's no need to read/poke the data again.
The patch is actually resident in RAM on the direct page until you turn off the machine or it crashes.
BASIC code:
0 REM012345678901234567890123456789012345
1 GOSUB 10000
9998 DATA 60,54,55,206,67,101,236,1,221,246,236,3,221,248,236,5,221,250,236,7,221,252
9999 DATA 51,50,56,57,240,129,58,37,1,57,126,225,204
10000 FORI=0TO34:READ A:POKE 17227+I,A:NEXT:EXEC17227:RETURN
And the assembly for the TASM cross assembler:
; Simple speed up for MC-10 Microcolor BASIC
; (C)2018 James Diffendaffer
; May be freely redistributed
.MSFIRST ; Most Significant byte first
#define EQU .EQU
#define ORG .ORG
#define RMB .BLOCK
#define FCB .BYTE
#define FCC .TEXT
#define FDB .WORD
#define END .END
#define FCS .TEXT
#define equ .EQU
#define org .ORG
#define rmb .BLOCK
#define fcb .BYTE
#define fcc .TEXT
#define fdb .WORD
#define end .END
#define fcs .TEXT
org $434B
pshx
psha
pshb
ldx #PATCH
ldd 1,X
std $F6
ldd 3,x
std $F8
ldd 5,x
std $FA
ldd 7,x
std $FC
pulb
pula
pulx
rts
PATCH
FCB $F0
org $00F6
cmpa #':' ; set Z flag if statement separator
bcs AA ; perform more tests if not
rts ; return if >= ':'
AA jmp $E1CC ; jump to the parser back end
end