🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
3 messages
3 total messages Started by Austin H. Ziegler, III Fri, 23 Feb 1990 20:59
How to find ANSI...
#1330
Author: Austin H. Ziegler, III
Date: Fri, 23 Feb 1990 20:59
19 lines
1461 bytes
	For a program which I'm writing, I want to provide ANSI, BIOS, and
DMA screen support.  It is easy to determine whether I should use BIOS or
DMA, but I'm having problems detecting ANSI.  If anyone can point me to how
to check for any of the ANSI variants from within a Pascal or C program (I
will be using the Turbo variants, but I feel myself conversant enough with
both to translate to whichever form I will be programming in), I would
greatly appreciate it.

just my two bytes,
austin
--
+--------------------------------------------------------------------------+
| The surgeon general of the United States of America has determined that  |
| reading USENET turns your brain to jelly, leaving nothing to claim or to |
| disclaim. +--------------------------------------------------------------+
+-----------+ Austin Ziegler   austin@bucsf.bu.edu or austin@buengf.bu.edu |
| 700 Commonwealth Box 2094, Boston, Massachusetts  02215    BUENG '93     |
+--------------------------------------------------------------------------+
Re: How to find ANSI...
#1362
Author: Stephen M. Dunn
Date: Tue, 27 Feb 1990 02:58
26 lines
1877 bytes
In article <AUSTIN.90Feb23155939@bucsf.bu.edu> austin@bucsf.bu.edu (Austin H. Ziegler, III) writes:
$	For a program which I'm writing, I want to provide ANSI, BIOS, and
$DMA screen support.  It is easy to determine whether I should use BIOS or
$DMA, but I'm having problems detecting ANSI.  If anyone can point me to how

   Well, I don't have a program, but here are a couple of ideas which
will work:

1.  Position the cursor to some known location using the BIOS, and then
    write some ANSI code and look at what's in that known location.  If
    ANSI.SYS (or replacement) is present, it will be what was there
    before; otherwise, you should see the escape code you sent.

2.  Clear the keyboard buffer and send the ANSI code that reports the
    status of the display, then see if anything appears in the keyboard
    buffer (also check to make sure it's what you expect so that you
    know ANSI put it there and that it wasn't the user typing something).

   Don't forget to clear the screen immediately afterwards if ANSI.SYS
isn't present, or the user will wonder what that garbage that appears on
the screen is there for!
-- 
Stephen M. Dunn                               cs4g6ag@maccs.dcss.mcmaster.ca
          <std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
****************************************************************************
               I Think I'm Going Bald - Caress of Steel, Rush
Re: How to find ANSI...
#1418
Author: Joseph D. Shapiro
Date: Wed, 28 Feb 1990 17:41
18 lines
1411 bytes
In article <AUSTIN.90Feb23155939@bucsf.bu.edu> austin@bucsf.bu.edu (Austin H. Ziegler, III) writes:
>
>	For a program which I'm writing, I want to provide ANSI, BIOS, and
>DMA screen support.  It is easy to determine whether I should use BIOS or
>DMA, but I'm having problems detecting ANSI.  If anyone can point me to how
>to check for any of the ANSI variants from within a Pascal or C program (I
>will be using the Turbo variants, but I feel myself conversant enough with
>both to translate to whichever form I will be programming in), I would
>greatly appreciate it.

How about clearing the screen via BIOS, Homing the cursor via BIOS,
clearing the screen with an ANSI sequence, then reading the first
screen position via BIOS to see if it is 0x00 or ESC?
-- 
__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__
Joe Shapiro					"My other car is a turbo...
ISC-Bunker Ramo     				 ...too."
{decvax,yale,philabs,oliveb}!bunker!shap
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads