LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-05-2019, 06:07 AM   #31
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,709
Blog Entries: 10

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032

Quote:
Originally Posted by jsbjsb001;6064865So
while, and again, I'm NOT asking how it looks up the ASCII code in the ASCII table, nor am I asking how a given character is drawn; would it be correct to say that on a x86 desktop PC the ASCII table is programmed into the hardware, and the video card (or processor for integrated graphics) draws the given character(s) ?
I'm pretty sure that's how it used to be done. Of course the first VDUs replaced typing terminals (often converted teletypes), where obviously there was only one font and it was engraved on the typing head. Replacing that by a built-in font stored in memory was the obvious next step. But I think we are now one step further on, because on modern systems, you can choose your console font from the ones in /usr/share/kbd/consolefonts. I suspect what happens is that the chosen font is copied onto the video card and then acts like the old built-in ones did.

Similarly with the conversion table. ASCII can't be programmed in because you might want to use something else, for example UTF-8. But clearly the video card must be given the mapping as well as the set of glyphs it maps to (the font). After that, all it has to be sent is a string of code numbers. The mapping table then points it directly to the glyph it has to draw for each code.
 
Old 12-05-2019, 06:13 AM   #32
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,906

Rep: Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384
Meta: "RT" refers to "NevemTeve" or "rtmistler"?

Q: I'm simply asking where exactly is the ASCII table stored?
A: What do you mean under that? Maybe a byte-array of 127 bytes in some memory that contains values between 0 and 127?

Q: and WHAT actually draws the given character on the screen
A: Your VGA card, obviously.

Last edited by NevemTeve; 12-05-2019 at 06:27 AM.
 
Old 12-05-2019, 07:07 AM   #33
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,218
Blog Entries: 13

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Quote:
Originally Posted by NevemTeve View Post
Meta: "RT" refers to "NevemTeve" or "rtmistler"?

Q: I'm simply asking where exactly is the ASCII table stored?
A: What do you mean under that? Maybe a byte-array of 127 bytes in some memory that contains values between 0 and 127?

Q: and WHAT actually draws the given character on the screen
A: Your VGA card, obviously.
RT refers to me.

I concur with these exact answers.

Can I ask if there are additional questions?

EDIT: Or if these answers do not address your questions?

Last edited by rtmistler; 12-05-2019 at 07:36 AM.
 
Old 12-05-2019, 09:33 AM   #34
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,039

Rep: Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590
Quote:
Originally Posted by jsbjsb001 View Post
I'm trying to improve my maths skills to get a better handle on C concepts, the same as I'm trying to get a little better of an understanding about how the computer "knows" that a ASCII code is for a given character, and what exactly "draws it" on the screen.
The actual characterset, used in TEXT mode at 80x25 lines (the original non-graphic display adapters used, VGA=normal kernel parameter) is stored IN the adaptor itself, the computer only send the codes to that adaptor.
Other resolutions, even in text mode, need a graphics card and the "framebuffer" driver in the kernel, that driver gets the characters, in the right size for THIS resolution, from one of the font files on disk.
So you still send only ASCII codes, but the actual conversion is done in software by the kernel (module) and the adaptor just gets the resulting pixels.
With newer kernels it is even possible to use an adaptor-specific kernel module for this, which means all possible resolutions the card CAN do are possible in text-mode too.
But still the kernel (and its module) does the work, so they're soft fonts.

PS: the original VGA font is a fixed font of 9 x 16 dots, it was meant for the original resolution of 640x400 TEXT mode of the VGA adaptor (btw: in graphics mode it was 640x480, so with a bit of tinkering you could get more lines on the screen, but you couldn't change the font).

Last edited by ehartman; 12-05-2019 at 09:38 AM. Reason: addition about VGA
 
2 members found this post helpful.
Old 12-05-2019, 10:11 AM   #35
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: Currently OpenMandriva. Previously openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,278

Original Poster
Rep: Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695
Thank you very much ehartman!

That's basically what I was wondering, and I think that fairly well covers my questions.

Thanks again!
 
Old 12-05-2019, 11:41 AM   #36
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,039

Rep: Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590
Quote:
Originally Posted by jsbjsb001 View Post
That's basically what I was wondering, and I think that fairly well covers my questions.
Additions:
The characterset, stored in the adapter isn't actually an ASCII (AMERICAN Standard Code for Information Interchange) one (although that is a subset OF it), but a PC characterset for all of the 256 values of a byte and includes line drawing characters en some international ones like accented letters and Greek ones.
It is NOT identical to either ISO-8859-* or UTF-8, which both came much later (then either ASCII or PC characters).
Until code pages (cpXXX) were introduced in MS-Dos (release 3.3) it was the ONLY available characterset for text mode. In graphic mode you could of course draw your own characters, as wanted.
See en.wikipedia.org/wiki/Code_page
The original character set later was defined to be code page 437 (cp437) and code page 850 is like ISO-8859-1

Of course, with a fixed characterset no true internationalization is possible, you're restricted to the characters which are there.
 
Old 12-05-2019, 04:47 PM   #37
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: Currently: openSuSE, Raspian, Slackware. Formerly: CentOS, MacOS, Red Hat. Other: Solaris, Tru64
Posts: 1,601

Rep: Reputation: 189Reputation: 189
Quote:
Originally Posted by hazel View Post
I remember that at work, back in the '80s, we used remote terminals with quite a low line transmission speed and you could actually see the text being written out line by line as the characters came over.
Back then, many of the offices/labs where I worked still had only 300 baud line speeds. I was thrilled when my office was upgraded to 1200 baud. The director's office was equipped with a 9600 baud line. He had a graphics board in his ADM-3A terminal and that line speed was essential otherwise plots rendered too slowly but I found using his terminal too fast for general purpose use---I couldn't issue Ctrl-S fast enough to reliably pause program output to read messages while debugging. (No utilities like 'more' or 'less' available on the OS we used on the IBM supermini.)

But if you want really slow? As an undergrad, I watched a couple of students play the classic old startrek game on a Teletype. Took forever to print out the map of the galaxy. :^D
 
Old 12-05-2019, 06:58 PM   #38
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,039

Rep: Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590Reputation: 590
Quote:
Originally Posted by rnturn View Post
But if you want really slow? As an undergrad, I watched a couple of students play the classic old startrek game on a Teletype. Took forever to print out the map of the galaxy. :^D
Yeah, the old teletype was about 110 bytes/sec.
And having to really MOVE the printing head (and paper, for a new line) doesn't help either. No bi-directional printing either.

My first (as a user/programmer) computer was a PDP-11 with a 300 byte/sec DECwriter and a 9600 Tektronix 4010. While debugging we mostly used the DECwriter, everything was on paper then. Especially, of course, when you were debugging graphics, because then the Tektronix was in graphics mode and didn't display any text output.
But as the 4010 used a "page full busy" you could read all text on it too, before pressing the key to clear the screen (and get another screenful of output).
 
Old 12-05-2019, 10:39 PM   #39
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,218
Blog Entries: 13

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Used to operate Model 28 TTYs.

And then there were the acoustic couplers where the dog barked or the kids shouted and they messed up the data on the line.
 
Old 12-06-2019, 05:19 AM   #40
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,709
Blog Entries: 10

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Oh this is so nostalgic! I remember acoustic couplers too. They weren't very reliable but at least in the office there were no dogs. You rang up the remote computer and there was a high-pitched warble, which was your signal to put the handset into the padded coupler rest. You used telnet to log in and something called Kermit for file transfer. I believe Kermit was free software.

We used Decwriters quite a lot in BRE Library. They were our main input devices before VDUs came in. When I first arrived, there was only one library terminal, an authentic TTY, but that was considered old technology even then. Later several of us had Decwriters in our offices.

PDP-11s were the workhorses of the laboratories. BRE had quite a few of them scattered around the site but there were none in the library. We did however use a borrowed PDP-11 to run our first tests on STATUS, which became our cataloguing system for a while. I remember them as being unreliable and crashing a lot. The tests incidentally were on a small trial database consisting entirely of dirty limericks.

Last edited by hazel; 12-06-2019 at 05:20 AM.
 
Old 12-08-2019, 04:28 PM   #41
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: Currently: openSuSE, Raspian, Slackware. Formerly: CentOS, MacOS, Red Hat. Other: Solaris, Tru64
Posts: 1,601

Rep: Reputation: 189Reputation: 189
Quote:
Originally Posted by hazel View Post
Oh this is so nostalgic! I remember acoustic couplers too. They weren't very reliable but at least in the office there were no dogs. You rang up the remote computer and there was a high-pitched warble, which was your signal to put the handset into the padded coupler rest. You used telnet to log in and something called Kermit for file transfer. I believe Kermit was free software.
I had an ITT ASCIIscope that I used from home. The built-in acoustic coupler was limited to 300 baud and was a real pain; dust got into the couplers and caused a lot of line noise. I wound up wiring up a connector directly to our phone and connecting it to the DB9 port on the terminal---got me a reliable 1200 baud connection. Despite the smaller than normal screen size, it sure beat having to drive into the lab at night to finish up code.

I was the campus maintainer of Kermit back when it was written in assembler. Great fun that was. I have a still signed copy of the Kermit book from Digital Press (signed by Frank de Cruz himself) that I picked up while I was at the '88 DECUS Symposium in Anaheim. The software was a real workhorse back in those days.

Those were interesting times.
 
  


Reply

Tags
ascii, character set, characters


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GLib: Conversion from character set 'UTF8' to 'ASCII' is not supported. wesley_q Linux - Software 1 06-16-2015 05:58 AM
ASCII, ANsI, create my own Extended character set??? AngryAngry Programming 4 05-05-2014 06:29 PM
[SOLVED] What is the difference between "ASCII English text" and "ASCII text" ??? astanton Slackware 13 08-05-2011 07:14 AM
To know the function on checking whether a character is ascii or unicode character. murugesan Programming 2 01-23-2009 02:07 PM
I cant draw a ASCII table in c++ shell console DonnyYangR Programming 6 05-23-2008 07:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration