cjl@iucs.cs.indiana.edu (11/09/87)
> The function keys actually return two codes when pressed. The first of > these is an escape (ascii 27). (NOTE: This is in TP ONLY. In reality the > first scan code is 0, and most languages use that. I don't know why Borland > coverted it). The second is ... According to ASCII, ESC (27) is used for designating escape sequence not the NUL (0) character. For example Microsoft's driver ANSI.SYS is consistently using ESC as the output escape character not NUL character. Unfortunately many application programs use ESC as an input command e.g. aborting the execution. I guess it is for this reason IBM uses NUL as the input escape character not ESC. C.J.Lo Dept. of CIS, IUPUI cjl@iucs.cs.indiana.edu {ihnp4}...{inuxc|pur-ee|rutgers|uiucdcs|mit-hermes}!iucs!cjl
marty@uw-june.UUCP (Marty Sirkin) (11/10/87)
In article <126200001@iucs>, cjl@iucs.cs.indiana.edu writes: > >> The function keys actually return two codes when pressed. The first of >> these is an escape (ascii 27). (NOTE: This is in TP ONLY. In reality the >> first scan code is 0, and most languages use that. I don't know why Borland >> coverted it). The second is ... > > Unfortunately many application programs use ESC as an input command > e.g. aborting the execution. I guess it is for this reason IBM uses > NUL as the input escape character not ESC. This has nothing to do with the issue. The scan code returned by the *machine's* built-in interrupt is a 0, not a 27. Only Tp 3.0 converts it to an escape. Since no other key can possibly return a zero, that's why it is used (after all, with the routine I gave you can determine an escape from a page up, for example). BTW, I just got TP 4.0 and noticed that they changed it to ascii 0 for the first code... Marty Sirkin
catone@dsl.cis.upenn.edu (Tony Catone) (11/11/87)
In article <3575@uw-june.UUCP> marty@uw-june.UUCP (Marty Sirkin) writes: > > This has nothing to do with the issue. The scan code returned by the >*machine's* built-in interrupt is a 0, not a 27. Only Tp 3.0 converts it >to an escape. Since no other key can possibly return a zero, that's why it >is used > Marty Sirkin If no other key can possibly return a zero, what do Ascii nulls return? I know that they are mapped to Ascii code 3 by service request 7 of intr 21 hex, but what does the BIOS do with them? - Tony catone@dsl.cis.upenn.edu catone@wharton.upenn.edu
marty@uw-june.UUCP (Marty Sirkin) (11/11/87)
In article <2481@super.upenn.edu>, catone@dsl.cis.upenn.edu (Tony Catone) writes: > > If no other key can possibly return a zero, what do Ascii nulls return? > I know that they are mapped to Ascii code 3 by service request 7 of > intr 21 hex, but what does the BIOS do with them? The above was in reference to intr 9, and what scan codes it returns. I may have made an overstatement here. Which keys return an ascii null?? None that I know of (or are listed in my beloved Norton)... Marty.