On Fri, 20 Jul 2001, Randy Goldenberg wrote:
> On Friday July 20, 2001, ANDY wrote:
> >
> > if I write a program in ANSI C (is Arachne written in
> > ANSI C?) does that mean it will run on ANY hardware?
>
> If you (successfully) write a program in ANSI C, it will
> run on the platform (i.e. OS) is was compiled for, on any
^^^^^^^^^^^^^^^^^^^^^^^
so if I write a program either in C/C++, assembly language or machine
language, I must have a *thorough* knowledge of the inner workings of
the OS, DOS, Windows, *nix that I am writing the program to run on,
*before* I start writing the the code (not necessarily the program)
would you write a DOS, Windows or *nix app in assembly language or machine
language? maybe assembly but does machine language "go too deep" to be
used for a windows app?? I know when writing a machine language program
one must have a thorough knowledge of the inner workings of/all the,
*CPU chip*(Not OS) calls, specifications etc.
p.s. if machine language is appropriate for OS creation, what
specifically is assembly language appropriate for?
I am concluding that in order to succesfully write *code*, C/C++ or
otherwise, one must have a thorough knowledge of both, the CPU chip and
memory constraints(hardware) And the OS which the code is to be executed
on... alot to study for the programmer(s)!!
makes me want to give up programming and stick to systems analysis :)
> hardware capable of running that OS, provided the program
> doesn't call on any capabilities not provided by that
> hardware. :)
>
> > when I write a program in C or C++, will it's ability to
> > run, or/and run properly, on a/or given hardware, depend
> > on what compiler/programming environment I use??
>
> If your programs don't run because of hardware issues, it
> would most likely be because the application is calling on
> the system to do something it is physically incapable of.
> For example, if an application uses opcodes only available
> on 386 and higher processors, a 286 will fail to execute
> it.
The hardware that your applications will be able to use
> is determined by your choice of compiler, and the way you
> choose to configure it. ^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^\
what does this mean?
>
> > and, if so, how would I find out which
> > compiler/programming environment offers the greatest
> > hardware compatibilty? (I forget which compiler was used
> > for Arachne)
>
> I'm just starting to fool around with programming myself,
> and being self-taught in all matters computer-ese, there
> are no doubt huge gaps in my knowledge. With that
> disclaimer firmly in place, I'd say that compilers capable
> of creating programs that will run on 8 bit XT processors
> offer the greatest hardware compatibility. Keep in mind
> though that they call it "backwards" compatibility for a
> reason. :)
>
> > how would I find out which compiler/programming
> > environment is suitable for which hardware? or I guess I
> > should ask: which hardware is suitable for code
> > compiled/created using which compiler/programming
> > environment??
>
> Sometimes the limitations are built into the compiler, as
> in the case of DJGPP, which generates only 32-bit code, and
> sometimes they are the result of choices made by the
> programmer. If you're interested in compiling code for older
> machines, you might be interested in the (old) version of
> Turbo C available for free download from Borland. (Follow
> the links from "museum".)
>
>
> >
> > just curious...
> >
> > Andy
> > [EMAIL PROTECTED]
> >
> >
>
> --
>