[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A simple BASIC question



David Empson wrote:
> 
> 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
I wish I'd seen this patch eight years ago. I got frustrated when
working on the IIes at school and hitting delete when I made a mistakee. 
(deliberate) :)
-- 
Notice to spammers: This is to be considered a contract. You may only
use my e-mail box for advertiseing IF you send me $10 (US) for the first
kilobyte of data, and $1 for each additionial K of data. If I have not
recieved the money withing 1 week of the arrival of the message in my
e-mail box, the price for downloading and archiving for the week will be
$100. If you do not agree to these terms, do not send me bulk e-mail.
Remove the pay from my address if you agree to these terms.