home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG042.ARK
/
HOW2BS.DOC
< prev
next >
Wrap
Text File
|
1984-04-29
|
3KB
|
63 lines
HOW TO PATCH CP/M VER 1.4 TO ECHO 'DEL' AS 'BS'
-----------------------------------------------
The patches listed below will allow CP/M to echo the delete function
as a backspace. Since one of the patches takes advantage of the
jump relative capability of the Z80, THE PATCHES WILL NOT WORK AS
DESCRIBED ON AN 8080 SYSTEM. However with the info given it will
be simple for an 8080 user to make the appropriate patch that will
function.
CAUTION: I am currently using this patch and to date it has proven
to work well. It does not work within the 'Insert' mode of the
Editor, but it does work at command level. I'll leave it to some-
one else to figure out why. Anyway use it at your own risk.
PATCH ONE: The console input routine (12F3H) gets a char and, after
testing for carriage return, tests for 'delete'. If the test for
7FH is successful, CP/M gets the counter from Reg B and tests it for
zero. If true (i.e. we're at start of buffer) a jump is executed
back to the console input routine.
If we are not at the start of the buffer, CP/M loads the previous
char (pointed to by HL) into the Acc and jumps to the CONOUT rout.
Since we want to echo a backspace instead of the previous char,
replace the MOV A,M with MVI A,08 (or whichever character it is that
your terminal treats as a backspace). The extra memory location
required by the MVI instruction is recovered by replacing the
JZ XX73 with JR Z,E9. More precisely:
LOC IN TPA AFTER ORIGINAL MACHINE CODE REPLACED BY
SYSGEN
---------------- --------------------- -----------
1308 CA XX 73 7E 28 E9 3E 08
PATCH TWO: CP/M will convert any character less than 20 hex to
its Ascii equivalent preceeded by '^'. All except CR, LF, and
TAB that is. To enable our backspace character to be echoed
unchanged, we insert a patch at the start of the conversion
routine to test for '08' and exit if true. Again in the TPA:
LOC IN TPA AFTER ORIGINAL MACHINE CODE REPLACED BY
SYSGEN
---------------- --------------------- -----------
12B0 F5 3E 5E C3 <PATCH>
AND:
<PATCH, LOC N/A FE 08 CA 3A
YOUR CHOICE> XX F5 3E 5E
C3 XX 33
NOTE: The 'XX's above must be replaced by the approprite page
boundaries if your operating CP/M system.
Also since we are only echoing one backspace, the control
characters which CP/M echoed as two characters will not be
completely removed (We leave the '^'). Again I will leave it
to you to come up with a more glamorous fix.
<EOF>