TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Eric Kilfoil
from: George White
date: 1998-10-04 11:09:00
subject: Re: Pixels

Hi Eric,

EK> Bill Birrell was once heard saying:
EK>->  > Okay. Well.. How do I write a pixel then?
EK>->
EK>->     Pixels are not standard C. Therefore you have to use a compiler
EK>-> that
EK>-> supports them on a machine that uses them. Microsoft, for example,
EK>-> does on the
EK>-> PC - _setpixel(), _getpixel(), _videoconfig() etc. See graph.h.

EK>Pixels are standard to any language if you do it right.  You can access the
EK>video memory directly and write a complete page of pixels
EK>then change the page on the video card to display the

Maybe they are, but only if you are being specific to the PC! :-(
This echo tries to cover general C programming, not just the PC
platform, for platform specific questions people are referred to the
appropriate echo.

I sometimes code for embedded systems and they certainly do _NOT_ have
any concept of pixels. All my embedded systems so far only have a serial
port for debugging output, no other visual dislay at all.

EK>screen.  I've never tried this under linux, and I'm not
EK>sure what it would do, but I do know that it would
EK>work.Keep in mind that you will need to know/detect the
EK>video card before most of this can work.  If you really
EK>want to know more about graphics read up a bout mode 13h
EK>(320x200 and supported by all VGA cards).  I think (don't
EK>quote me on this) that following code will work:

Not on any of the non PC work that I do in C...

 PC specific sample code.

EK>That should work on a dos machine.. i've never tried it
EK>under linux and I don't know whether linux REQUIRES you to
EK>use the libVGA stuff to direct video writes.

But C exists for a multitude of platforms, most of which have no concept
of pixels and so no support for them. The code won't work for David as
he uses OS/2...

C is probably the most common high level language used for programming
embedded systems, very few of which have a pixel addressible display.
I'll probably be getting a C compiler and tools for the 8051 soon for a
job I'm quoteing for, no display hardware involved at all. That is why
we keep pointing David to appropriate echos for the OS and hardware he
is using.

George

 * SLMR 2.1a * Computers eliminate spare time.

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-717904) (2:440/4)
SEEN-BY: 396/1 632/0 371 633/260 267 270 371 634/397 635/506 728 810 639/252
SEEN-BY: 670/218
@PATH: 440/4 255/1 251/25 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.