Re: [ILUG] Linux architecture and C programming

From: Niall O Broin (niall at domain linux.ie)
Date: Tue 12 Jun 2001 - 12:25:07 IST


On Tue, Jun 12, 2001 at 10:13:08AM +0100, James Cooper wrote:
>
> > OK i'm new to Linux and these questions may seem dumb....
> > I've just run my first C program using gcc on Linux Mandrake 7.2. and i'm
> > running an AMD Athlon cpu.
> >
> > a) what architecture is linux using? (recommended reading ??)
> The Linux architecture depends on your CPU, in your case AMD Athlon which
> i think is an Intel x86 clone. When you compile a program from source
> that's in a tarball (*.tar.gz, *.tar.bz2) the './configure' script detects
> what machine you have and compiles for that machine. You can force it to
> compile to another architecture but you won't be able to execute the

You won't be able to compile for another architecture unless you've
installed the relevant cross-compiler.

> program unless you have an emulator for that architecture (vmware etc)

VMware is NOT an emulator, but rather a virtual machine (hence VM). You
can't run code for non X86 processors under VMware (unless you use another
emulator there).

> d) How do I write to my SoundBlaster PCI 128 card under Linux?

You don't, unless you're writing a driver. For normal use, you use the
various sound APIs.

> e) How do I write to my Riva TNT video card under Linux?

As per the sound card, except more so. Unless you're an XFree or SVGAmode
(or whatever) developer, you don't write to the video card.

Regards,

Niall



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:38 GMT