[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A simple BASIC question
Jon Christopher Co <jon@tridel.net> wrote:
> while we're at this topic... is there a patch I can use on prodos or dos3.3
> so that my //e treats the delete key like a backspace?
The best way to do this would be to patch out the keyboard input routine
with one that filters the keys and maps the delete key to the backspace
key before passing it on.
The difficulty is actually retaining this patch through various system
mode changes. For example, you would need a second patch to make it
work in 80-column mode, and the 80-column firmware likes to set up its
own pointers when being enabled or disabled.
It can certainly be done as a temporary measure, e.g. as follows (ProDOS
only, 40-column mode only):
]CALL-151
*300:D8 20 1B FD C9 FF D0 02 A9 88 60
*3D0G
]IN#0,A$300
]IN#0
Your delete key will now generate a backspace. The above code is
calling the real KEYIN routine, comparing the result to $FF (DEL),
converting that value to $88 (BS), then returning the result (other
characters are unmodified).
I'd hesitate to put this kind of routine at $0300, however, because that
is a rather popular place for machine code stubs, and you don't want
your keyboard input to crash! A better solution would be to reserve
some memory using BASIC.SYSTEM's GETMEM function, and put the patches
there. This is left as an exercise for the reader. :-)
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand