Re: A89: C and 68k?
[Prev][Next][Index][Thread]
Re: A89: C and 68k?
>
> In a message dated 98-09-27 21:39:58 EDT, you write:
>
> << Are C and 68k languages alike? >>
>
> i don't think so. but then again i'm probably wrong.
>
> C is a programming language.
> 68k is a motorola processor.
> there might be a C compiler for the 68k, but i wouldn't know.
> otherwise, i think you have to program in pure asm for the 68k.
This is what I think is being asked,
*68k*
This usually refers to the assembly langauge for that type of
processor, in this case the 68xxx series from Motorola. (As far as
programmers are concerned) Assembly is a "low level" langauge, and
therefore learning assembly on one processor type means that if you
move to another type of processor you have to learn a lot again. You
have to know the commands for the chips in question. ie, Z80 or 68000
families.
The script is then generally assembled for the program to run. There
are variations to this for debugging purposes though. The script is
not portable between different platform types without a lot of
changes.
Note that 68060 specific code will not run on a 68000 processor, even
on the same platform type. It will generally work the other way round
providing the platform is the same though. (For platform read
computer)
*C*
This is supposed to be a relatively processor independant "middle
level" programming language, until you want to compile it, that is,
turn it into a program. When writting the scripts, the processor that
is is to be compied for is not usually important.
The actual script usually needs only a few tweeks for different
processors and the hardware they are integrated into. This depends,
however, on the complexity of the program in question. Programming is
generally easier (and so program development is faster) with C since
the processor commands do not have to be understood.
The C compiler is definately platform and processor specific. For
instance, the 68xxx series of Amigas and Macs have different
compilers, even though the processor may be the same. This is due
to the interfacing hardware, such as the diplay, ports and ram access
being different.
A compiled C program is platform specific, although the script may be
portable beween them with no or little modification being required.
*Conclusion?*
Generally, C only has to be "learned" once apart from a few platform
specific areas. Assembly has to be relearned for the mostpart if the
processor family is different. If the family is the same only some
commands may differ.
It is possable for C to be used for the TI-8x range providing a
compiler is available for that calculator. There is no reason that the
compiler can not be run on a Mac, Amiga, PC or any other platform
providing it is designed to do so and the output is compiled for the
TI-8x in question. This can also be done with Assembler, providing
the script is for the correct TI-8x as well as the assembler itself.
If the platform used to generate the program has a TI-8x emulator it
could be used to check the program developed. For Assembly the sofware
in question is usually more compact so can be built into the TI-8x
hardware, which I believe it is (I could be wrong since I am still
waiting for my new TI-89).
Compiled C code is generally bigger than Assembly derived code, and
therefore slightly slower (or very much slower in some instances). In
most cases the end user does not know the difference.
If you are interested, for C, read any ANSII C book to get an idea of
what is envolved. For Assembly you will need to read a Z80 or 86000
assembly book, depending on your calculator.
Apologies for any errors in the above as I am not a hardened
programmer!
Dave Lusk
If there is any errors in the above my apologies, I'm not a hardened
programer.
References: