1. Codes
- Posted by "Wallace B. Riley" <wryly at MINDSPRING.COM> Aug 09, 1997
- 686 views
- Last edited Aug 10, 1997
--=====================_871171748==_ I have been exchanging some personal correspondence with Anders Eurenius, and I think we have a problem in semantics. I'd like to get some opinions from other Listserve subscribers on the matter. The problem is described in the attached message. Wally Riley wryly at mindspring.com --=====================_871171748==_ Two or three weeks ago I asked Listserv how to generate a beep in Euphoria. Several people replied, including Pete Eberlein, who provided a routine that worked -- thanks again, Pete! Anders commented on my difficulty. In replying to his message, I said (in part): In [two old] BASIC programs [to generate a beep] I print the hex character #07 on the screen. In the original ASCII, which is now probably obsolete or at least obsolescent, #07 is the code that sounds a beep. In ANSI code, the newer version of ASCII (and sometimes called ASCII -- erroneously, I suspect, because it is too easily confused with the former code), #07 is a bullet of some kind, the sort of thing that one might use to emphasize paragraphs. ANSI apparently has no code for a beep; nor does it have one for carriage return or line feed (these used to be #0D and #0A respectively, but those codes now represent more bullets). To this, Anders replied (again in part): American Standard Code for Information Interchange is the "solid" one! It's really what "text" is "made of" in computers! (It sometimes varies a little, but...) ANSI is an add-on, and is mostly used for interactive terminals, where you need to do things like changing colours or moving the cursor. ANSI is ASCII-text, but with multicharacter patterns for special commands; ESC,"[42m" changes bg (?) col to color number 3. Anders expressed surprise that I had a table with ANSI codes in it, as well as ASCII. I was preparing to send him copies of both tables, when I found three tables in various places showing what I understand to be ANSI, but all calling it ASCII. Therein lies the problem. When I see the term ASCII, I think of the seven-bit code with 128 permutations, of which 96 form printable characters (the others are control characters, such as Return, Line Feed, Form Feed, End of Transmission, and so on -- including BEL, or electronically a beep). I first heard about this code back in the mid-1960s, when IBM was considering adopting it for the then-new System/360 computers. The seven-bit code became an official standard some years later. Where an eight-bit computer uses this version of ASCII, the most significant bit is 0. (IBM decided on EBCDIC instead of ASCII for the 360, because it was more closely related to its older BCD code. Eventually even IBM began to use ASCII.) Later, as computer technology advanced, and more and more people began using them (particularly with personal computers, in the 1970s), shortcomings of the seven-bit ASCII code became obvious, and the eight-bit ANSI code took its place. Of the 256 permutations in ANSI, 96 are identical to the printable codes in ASCII, having the same bit configuration (including the leading 0 bit). The 32 control codes in ASCII were replaced by various miscellaneous symbols, including bullets, arrows, and even musical notes. In ANSI, all the codes with a leading 1 correspond to characters not found in English, but useful in certain foreign languages -- including characters for various monetary systems (pound, yen, etc.) and a few mathematical symbols not included in the seven-bit ASCII. One of the three tables I mentioned is in a handbook on QBASIC; one is in the manual for DOS 6 (where it is obviously ANSI, but is not called by that name; it is just "the code" for the U.S.) amd one is generated by one of the sample programs included in the original Euphoria package. So what do you think? Is the original seven-bit ASCII code dead? If so, what exactly is the distinction between ASCII and ANSI? --=====================_871171748==_--
2. Re: Codes
- Posted by Larry D Poos <ldpoos at JUNO.COM> Aug 10, 1997
- 729 views
On Sat, 9 Aug 1997 20:06:54 -0400 "Wallace B. Riley" <wryly at MINDSPRING.COM> writes: >Subject: Codes >So what do you think? Is the original seven-bit ASCII code dead? >If so, what exactly is the distinction between ASCII and ANSI? TMALSS ASCII (American Standard Code for Information Interchange) is the bit definition map for each of the 256 bit patterns that can be held by one byte. for example "A"=65=#41=01000001, <BEL>=7=#07=00000111 . All computers and apps that use ASCII are aware of this. ASCII comes in two Flavors 7-bit and 8-bit. wich are identical for the first 128 characters but characters with a value of 129 or greater are defined in the extended set, AKA HI-ASCII, AKA 8-bit. Yes, ASCII can play heck with a machine designed to run EBCIDC. ANSI (I looked and could not find the real meaning of this acronym) is a standard for the *display* of ASCII on PC's. The little smiley faces and symbols you see on your screen are the result of an ASCII byte being passed to the ANSI driver, then to the BIOS. When the byte to be displayed is a <BEL> the ANSI driver tells the CPU to call the BIOS routine to display the character mapped in position 7 (the little round bullet). ANSI.SYS also has escape sequence commands that allow for cursor and screen control. NO data is stored in ANSI format, ALL data is stored in ASCII. A file can contain sequences that the ANSI driver recognizes as commands so that when they are displayed via the "type" command screen colors and cursor position will change and function keys can be programed (ANSI "Bomb" a very old method of messing with someones computer via mail). The charts you have are just easy reference charts that cross ANSI to ASCII to DEC or HEX and may even give you the CTRL-[key] press to use to get the keyboard to send the ASCII Control character to standard output. I would say Anders and you both win Teddy Bear's. You both have a basic understanding of the subject but he has the pieces you are missing and you have the ones he is missing. Larry D. Poos -[USMC (Retar{bks}{bks}ired) Havelock, NC]- - Programming and System Consultant, LTAD Enterprises -
3. Re: Codes
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Aug 10, 1997
- 671 views
Larry D. Poos wrote: >ANSI (I looked and could not find the real meaning of this >acronym) Isn't that American National Standards Institute? I'd like to win a Teddy Bear too Sincerely, Ad Rienks email Ad_Rienks at compuserve.com writing at 18:37 , = on zondag 10 augustus 1997 Using EMail Assist for WinCIM