HI, > On Jul 30, 2022, at 2:15 AM, TK Chia <u1049321...@caramail.com> wrote: > > Hello Ralf Quint, > >> Well, not having comments to understand what you are doing is pretty >> tough when you don't have the time to analyze the code line by line. But >> IIRC, the common way to check for the presence of an ANSI device driver >> was to check via an INT 2Fh (multiplexer) call (don't recall the exact >> call value (AX/AH)). >> >> Will take a closer look at this later this evening when I am back, I am >> heading out to this year's SCaLE conference... ;-) > > What Jerome's code does is to send an `ESC [ 6 n' sequence and try to > check (in a particular way) if the console responds with a "keyboard > input" sequence of the form `ESC [' ... `R CR'. > > About these sequences, the Linux console_codes(4) man page says, > > "ESC [ 6 n > > "Cursor position report (CPR): Answer is ESC [ y ; x R, where x,y > is the cursor location. > " > > Thank you! > > -- > https://gitlab.com/tkchia >
Correct. The test works correctly under at least the most recent versions of MS-DOS (6.x), PC-DOS and DR-DOS. As Tom said, it would most likely fail (and return FALSE) if the display was over a network connection. However, adding a simple WAIT and TIMEOUT would probably solve that. Usage over a remote VT100 terminal connection was probably something I was thinking about at the time. That is also most likely one of the reasons it completely avoids the BIOS for the probe. :-) Jerome _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel