Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!oliveb!sun!landauer From: landauer@sun.uucp (Doug Landauer) Newsgroups: comp.sys.ibm.pc Subject: Re: CED v1.0C patches for ^U & ^W Message-ID: <19416@sun.uucp> Date: Thu, 21-May-87 04:37:04 EDT Article-I.D.: sun.19416 Posted: Thu May 21 04:37:04 1987 Date-Received: Sat, 23-May-87 10:25:49 EDT References: <378@vu-vlsi.UUCP> <584@vu-vlsi.UUCP> <1013@ark.cs.vu.nl> <19253@sun.uucp> <3198@sdcsvax.UCSD.EDU> <19414@sun.uucp> Reply-To: landauer@sun.UUCP (Doug Landauer) Distribution: world Organization: Sun Microsystems, Mountain View Lines: 77 In article <3198@sdcsvax.UCSD.EDU> holtz@beowulf.ucsd.edu (Fred Holtz) asks: > >Could someone list the context of this patch? I have CED version 1.0d and >would like to add CTRL/W... ... and I've had a few similar requests by e-mail. So here is a copy of the patch, annotated and including what some of the code originally looked like. In CED version 1.0C, this is a complete subroutine, so I don't know how helpful the surrounding subroutines would be. -u63a 44FE:063A 3C08 CMP AL,08 <--- Backspace 44FE:063C 7505 JNZ 0643 44FE:063E E86D01 CALL 07AE <--- so this is the "backspace subr" 44FE:0641 EB10 JMP 0653 44FE:0643 3C1B CMP AL,1B <--- 1B is ESCape; the "e 644 15" command implements ^U. 44FE:0645 7505 JNZ 064C 44FE:0647 E84000 CALL 068A 44FE:064A EB07 JMP 0653 44FE:064C 3C0A CMP AL,0A 44FE:064E 7403 JZ 0653 44FE:0650 E8FE00 CALL 0751 <--- This subr is called for any character that didn't match the ones we just checked for (BS, ^U, and newline). 44FE:0653 C3 RET Following is a dump of the data area I used for the patches. It's mostly error messages, but the one that starts at e10 is printed out when you enter a "ced ver" command. So there isn't much room -- you must replace that message with something that ends with a 0D (carriage return). -de00 2358:0E00 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 2358:0E10 63 65 64 20 76 65 72 73-69 6F 6E 20 31 2E 30 43 ced version 1.0C 2358:0E20 20 43 6F 70 72 20 28 63-29 20 31 39 38 35 20 62 Copr (c) 1985 b 2358:0E30 79 20 43 4A 44 75 6E 66-6F 72 64 0D 63 65 64 3A y CJDunford.ced: 2358:0E40 20 69 6E 76 61 6C 69 64-20 63 6F 6D 6D 61 6E 64 invalid command 2358:0E50 20 00 63 65 64 3A 20 62-61 64 2F 6D 69 73 73 69 .ced: bad/missi 2358:0E60 6E 67 20 61 72 67 75 6D-65 6E 74 20 00 63 65 64 ng argument .ced 2358:0E70 3A 20 62 75 66 66 65 72-20 66 75 6C 6C 20 00 63 : buffer full .c -q Here's an annotated version of the patch. ------------------ MKCEDCUW.BAT----------------------------- goto begin e 644 15 <-- replace the ESCape with a ^U. a 650 jmp e24 <-- Replace the "call 751" (the "other-characters" subr) with a jump into the patch. e e10 "ced1.0c(c)CJDunford" 0d <-- shorten the "ced ver" message ... this code is what actually implements ... the word-kill function a e24 cmp al,17 <-- is input char ^W ? jz e35 <-- if so, jump down to the "begin-of-line test" call 751 <-- not ^W, so call "other-characters" subr. ret call 7ae <-- call the "backspace" subr cmp byte -1[di],20 <-- is previous char a space? jz e3b <-- yes, jump down to the RET -- we're done cmp di,[04cd] <-- the "begin-of-line" test jnz e2c <-- not yet back to B.O.L., do a(nother) backspace ret -- Doug Landauer Sun's network: landauer@morocco Phone: 415 354-4747 ARPA Internet: landauer@sun.com UUCP: {amdahl, decwrl, hplabs, seismo, ...}!sun!landauer