0100 CONSOL = $D01F›0110 DEVTAB = $0320›0120 OLDDHT = $E400›0130 ;›0140 *= $0600›0150 INIT LDA CONSOL ;Load the console switch register›0160 AND #$04 ;and check for the OPTION key.›0170 BEQ RUN ;If it's pressed, branch to the RTS.›0180 LDA #NEWDHT&$00FF ;Otherwise, install the vector›0190 STA DEVTAB+1 ;to the new device handler table›0200 LDA #NEWDHT/256 ;in the appropriate place in the›0210 STA DEVTAB+2 ;device table and›0220 RUN RTS ;return.›0230 ;›0240 NEWDHT .WORD $F3FB ;This is the replacement›0250 .WORD $F633 ;screen editor handler›0260 .WORD GET-1 ;vector table. All the›0270 .WORD $F6A3 ;vectors have their default›0280 .WORD $F633 ;values except for the›0290 .WORD $F63C ;GET routine. which›0300 .BYTE $4C ;points to the replacement›0310 .WORD $F3E4 ;routine below.›0320 ;›0330 COUNTR .BYTE 0 ;character counter›0340 ;›0350 GET INC COUNTR ;Increment the character›0360 LDY COUNTR ;counter. Compare it with›0370 CPY #ENDLST-BEGLST ;the command list length.›0380 BNE CONT ;If not equal, branch to CONT.›0390 LDA #OLDDHT&$00FF ;Otherwise, reinstate the›0400 STA DEVTAB+l ;default screen editor handler›0410 LDA #OLDDHT/256 ;table vector at the proper›0420 STA DEVTAB+2 ;spot in the device table.›0430 CONT LDA BEGLST-1,Y ;Fetch the next character›0440 LDY #1 ;from the command list and›0450 RTS ;return.›0460 ;›0470 BEGLST›0480 ;The command list goes here.›0490 ENDLST .END›