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?

Mark E. Scott Jr.
mscott@dbcity.net


-----Original Message-----
From: Zoltan Kocsi [mailto:zoltan@bendor.com.au]
Sent: Wednesday, June 09, 1999 9:01 PM
To: assembly-89@lists.ticalc.org
Subject: Re: A89: TI89 ROM vs HP49 ROM



 > scientific calculators, and TI makes the best graphing.  What is HP
good at?
 > Well, scanners, printers (and from what it looks like recently, even
 > computers).  
 
Well, HP computers (the unix machines, Apollos, for example) were not 
junk either. One should maybe mention their semiconductors (the 
fastest optocouplers are from them), or their measuring equipment
(scopes, logic analyzers and so on).
 
 > If TI made most of it in C then I want them to release their
 > compiler now.  

??? You can have a 68k crosscompiler for free. The only thing you need 
is the calling and register save convention. Why should TI release
their compiler (which, probably, is a 3rd party product) ? What good
would it make to you ? If they happen to use Solaris on Sparc to
develop code on, you could not even put the compiler on your PC.
Get gcc, configure it to m68k and there you go.

 > They don't need to release their source code, they just have
 > to include some standard libs for the calc and some example source
code.

Calling functions in the calculator's FLASH is the same from assembly
as from C. If you could call routines from assembly, you can call them 
from C as well. If they developed their code in C, then your job is 
actually even easier. 
You need 2 pieces of info: the ROM routine names and arguments (in a
header file) and their entry address - no libraries or anything like
that.
The code in the ROM *is* the library which you link against.
 
 > What I do feel cheated about is that there is no built-in assembler.
The
 > TI-83 Plus (the new one where the number buttons are white) has a
built in
 > assembler.  The HP has a built in assembler.  I want one in my calc
also.  I
 > shouldn't have to worry about having it as long as I don't accidently
do the
 > trick to open access to my flash.

I think I don't really understand the problem. You bought a
calculator. The fact that it uses a standard processor and that they
let you run your binary code on it does not mean IMHO that they are
obliged to provide an assembler with it. All in all, it is a
calculator. Actually, when you buy a computer, do you get programming
tools with it ? I buy my machines systemless, but does Windows come
with an assembler ? As far as I remember, DOS didn't, you had to buy
MASM or whatever it was called.

As per using C vs. assembly: I've been out of uni for quite some time
so I don't know whether these days having the fastest calculator is
the ultimate macho thing. However, when you have a project to complete 
*in time* because there's some serious money and market share and
stuff like that involved, you wouldn't start writing a 200K program in 
assembly. Especially not because you know from practice, that your
program will spend ~90% of time in about 10% of code - that's where
you have to optimise every insn by hand. The rest simply doesn't
matter that much. In addition, my experience is that using assembly 
instead of C (and a good C compiler) gives you a speed ratio of ~2:1.
Choosing a suitable algorithm tweaked for the specific circumstances
instead of the trivial one can often give you speed increases in a 
magnitude range. If you write your code in C (or any HLL) you can 
focus on algorithms rather than low-level details about register usage 
and stuff like that. 

Zoltan



Follow-Ups: