RE: A89: TI89 ROM vs HP49 ROM
[Prev][Next][Index][Thread]
RE: A89: TI89 ROM vs HP49 ROM
> I'm not familiar with the cross compilers and all. But I know in Visual
> C++ I can put in assembly code inline. Is this possible with any of the
> 68k compilers out there?
Gcc (free) has one of the most powerful assembly extensions I've ever
seen. What it does is that you your assembly can be integrated into a
C function so the optimiser can make use of its internal register
content knowledge to generate tighter code.
For example, you write a little assembly function that (stupid thing,
but good example) adds two registers together and places the result in
a third. Then you tell the compiler that there are two input
parameters, they can be in any data or address register, there is one
output parameter which is in a data register. You write the function
with symbolic references to registers instead of absolute register
names (you can use absolute register references if you want of course).
Then, when your function (foo(), what else) is called the compiler
will see if the inpupt parameters are already in some registers. If
yes, then it will substitute these real register values into your
function's references thus saving all unnnecessary register
allocation, copies and so on. Your assembly is this seamlessly
integrated into the middle of a C function without unnecessary
overhead.
Gcc does also have some extremely useful extensions to the C language,
has a reasonable optimizer, compiles C, C++ and Objective-C. Runs on
practically any platform and generates code to practically any 32 bit
processor which is in real-word use.
The catch is, that gcc is a unix compiler even if you use it under
Windows and if you are the point&click type you may find it positively
hostile with its ~ 100 command line options.
If you like unix (and therefore know that those switches are always
entered by make and not you :-) you already know about it anyway ...
Zoltan
References: