From: John P. Looney (john at domain antefacto.com)
Date: Tue 12 Jun 2001 - 11:48:53 IST
On Tue, Jun 12, 2001 at 07:22:12AM +0100, Gil mentioned:
> a) what architecture is linux using? (recommended reading ??)
Linux is compiled for whatever architechture you need. For instance,
RedHat compile it up for i386, Alpha and Sparc (and a few others).
However, you can have specific targets; on a redhat CD, you will find
rpm's for i386, i486, i586 and i686. The different targets are for
AMD athlons will run i386, i486, and i586 code, as well as
> b) How does gcc/linux etc compile a program when its running under an
> Intel type architecture i.e does it use some kind of cross-compilation/
> look-up tables etc
I don't completely remember, but GCC has an intermediate code
representation format, not very dissimilar to Pascal's "PCODE". GCC
generates that, from C, C++, Fortran of Object C, and then creates
assembly language from that, depending on what it's told to do, with the
So, if you wanted extra Athlon optimisations, you could get athlongcc
from athlonlinux.org and use "gcc -mcpu=athlon" or some such. But, for
most people, i386 targets are fine - your code will run on any intel CPU.
> c) If the above is true why can't i use inline Tasm/Masm coding. Conversley
> how does nasm et al manipulate my intel-type cpu to produce "Linux" code?
Nasm does it's own work. GCC supports inline assember, but it's at a
different format to nasm. GCC won't work on assember directly...after all,
it's just a C compiler.
What exactly are you trying to do ? I know this is nasty, but I really
feel like telling you "Don't use assembler. Trust the C optimiser".
> d) How do I write to my SoundBlaster PCI 128 card under Linux?
> e) How do I write to my Riva TNT video card under Linux?
The recommended way is to use an intermediate library like SDL, from
libsdl.org. It has OpenGL acceleration for your RivaTNT (once you have
installed Mesa and then the nvidia drivers from nvidia.com), and it has a
really nice audio API too.
I've a feeling you want to go poking directly at the hardware; but don't.
At best, it'll crash your machine, be a lot of work, and you'll have
little gain. At worst, you'll use the wrong ioctl's and write to your disk
or something :)
-- When I say 'free', I mean 'free': free from bond, of chain or command: to go where you will, even to Mordor, Saruman, if you desire. " -- Gandalf, paraphrasing the choice between Free and Non-free software
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:38 GMT