home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
083.FTUR06.TXT
< prev
next >
Wrap
Text File
|
1993-07-30
|
8KB
|
132 lines
What's Up With That?
* Somewhat Enlightening Wanderings from the Mind of John Davis *
Computer geeks (CG's) cannot speak in normal terms, not because they
are by nature introverted, semi-social beings--they are, but that has
nothing to do with the common language problem! It is because the
computer/data management field itself is such an unnatural means of
communication that the CGs have adapted themselves to interact
optimally with the machine, therefore making themselves unfit company
for conversation with anyone but one of their own.
Jargon abounds, with terms like kluge, vaporware, cache, aliasing, and
de-fragment. Then there are the real brain-busters--the acronyms,
such as: GUI, DMA, CPU, I/O, DOS, API, DPI, and MOUSE. The terms are
confusing for the chipnophobic and, in some cases, for otherwise
intelligent and competent computer users. A case in point is the
perennial confusion of the terms ASCII and ANSI. They are often
perceived to be interchangeable to the unenlightened, but if you
should misuse one term for the other within hearing of a horn-rimmed
spectacled pocket-protector life-support system, the nasal chortles
will drive you to a mental system lock-up. In the interest of your
well-being, I will charitably enlighten you on the these two most
secret and basic terms of computerdom's secret society--Byte Motivated
Entellectuals (Byte-ME, for short).
The confusion stems from the fact that ASCII and ANSI are related
appellations for the code defining computer text, put forth by ANSI.
ANSI is the American National Standards Institute, a fascist
organization founded to boss the computer community around; though
not at the same level as the international bullies, the CCITT. ASCII
stands for the American Standard Code for Information Exchange, it is
formally known (though only to 3 computer science professors and a
Washington billionaire-bachelor) as ANSI Standard X3.4-1977. When
people talk of ANSI text however (and what exciting people they are!),
they are most often speaking of ANSI terminal codes invoked through
the ANSI.SYS device driver in DOS. Let me talk first of ASCII text,
and the related code, then I'll touch on how ANSI.SYS exploits this
code.
ASCII was formulated as a 7 bit code for data terminals, which math
tells us allows for 128 characters, not all of them printable. This
provided a quick method for data communications devices, such as CRTs
(another acronym; Cathode Ray Tube) and teletypewriters to
electronically communicate in a text-only fashion; the computer
equivalent of Morse Code. Because text messaging is still a dominant
form of information sent over wire, and the fastest method, ASCII is
still a very necessary code standard today. It is also considered a
universal interchange format for text based applications such as word
processors, spreadsheets, and databases. If you go to print in a
character-based application, chances are that the application is
simply sending the ASCII codes to the printer, which accounts for the
speed advantage of printing text over graphics. ASCII text requires
that 8 bits be sent to the printer for each character printed, while
text in graphics mode, such as that sent from Windows or by bit-mapped
fonts, requires a bit for each dot making up the graphics character.
The bit-mapped font gives you more control over the look at the
expense of that common shorthand called ASCII.
You'll note that I said "8 bits" per character for ASCII, when I'd
previously stated it was defined by ANSI as a 7 bit code. The reason
has proven a "bit" of a problem for computer users. IBM figured early
on that if 128 characters is handy for text definition, then graphics
and specialty characters could be defined by adding one bit to the
ASCII character set, resulting in the IBM Extended ASCII Set, 256
characters in all. The reasoning was sound in the non-graphical era
of the times, because the crude graphics characters gave users the
ability to do line and block drawings on text-only screens! (state of
the art special effects for the time).
IBM was not the only wishful thinker in the ASCII improvement game.
Printer pioneers Epson decided that by simply adding one bit to the
Character set they could define extra text characters to provide
printing enhancements like italics to the common man--result: The
Epson Extended Character Set. What a leap forward in screen and
printer sophistication these companies provided...Unfortunately, the
256 characters (more precisely the extra 128 characters) that IBM
defined were NOT the same as those defined by Epson. As a result,
block characters sent from a screen to an Epson (or Epson emulating)
printer print italic "garbage characters". The solution is to choose
IBM printer emulation when printing text in text mode with line
drawings, and choose Epson emulation when printing in text mode with
italic characters.
There are other ways provided through ASCII codes to control printer
output, which are known as "Escape Codes". If you've ever wondered
what the ESC key is doing on the computer keyboard in the first place,
this is it. --It was not originally meant as an escape mechanism for
programs that you delved too deeply into without manual support. The
ESC code allows devices that receive it (printers, CRTs) to interpret
the ASCII characters not as printable characters, but as special
control codes for the device. Printers can be operated and customized
for print size and paper handling through escape codes. CRTs have
developed such attributes as blinking text and inverse video through
the clever use of escape codes. The biggest windfall from escape
codes is "absolute cursor positioning" which allows clever programming
to place the cursor at any point on a screen, unavailable prior to
escape codesÆ inception.
This is the perfect moment to incorporate ANSI.SYS into the discussion.
It is a device driver to interpret ASCII escape codes for use by DOS.
Great, but about as understandable as saying "endoplasmic reticulum
uses the Kreb's Cycle to produce Adenine Tri-Phosphate for
consumption." You need a few definitions.
A device driver in DOS allows you to customize the peripheral's
interaction with the operating system--a translation program between
the device and DOS. When you type a letter DOS receives the keyboard
"scan code", interprets it and sends the character to the screen.
Likewise, when software or other device (such as a modem) sends a
character, DOS writes it to the screen. ANSI.SYS, when placed in the
config.sys file, intercepts all screen directed characters,
redirecting them into its "black box", interprets them, then sends
them to the screen. Sounds like an extraneous detour, but it allows
for very useful customization. I don't want bore you with a bunch of
literal examples, but the following are possible in DOS only due to
the ANSI.SYS device driver: Absolute Cursor Positioning, screen
colors and attributes, custom key definition (e.g. the "a" key doesn't
have to type "a", it can type "hey" every time it is hit if programmed
that way, with ANSI.SYS loaded). It is the driver that allows you to
get the "cool" effects on BBS's as well, making it well worth the
memory overhead. In short ANSI.SYS enhances your screen and keyboard
control in DOS.
ASCII text and ANSI.SYS seem like anachronisms in the GUI,GUI world of
windows and SVGA graphics, but an understanding of them is still
useful in getting the most out of your PC, and impressing the
technobabes in the user group.
Until next time...Escape code me outta here