A89: Re: Various 68K/TI89 things
[Prev][Next][Index][Thread]
A89: Re: Various 68K/TI89 things
> As a Z80 programmer trying to learn 68K, I wonder about a few things.
>
> First, what is this stuff about handles and the heap? Are handles sort
> of like they work in Windows, where they provide a number that represents
> a system object? How large is the heap?
A handle is an index in a table of pointers. The purpose of them is to make sure
you can find a memory block again after a memory clean-up.
> Second, why doesn't the 68K like odd addresses? Do the assemblers
> basically handle this for you, because I don't see very much use of the
> EVEN directive.
It's just designed that way (to make it faster, IIRC - it's not exactly a new
processor). As for EVEN, if you have a section if data that consists of
words/longwords you'd better put the EVEN directive before it to avoid address
errors.
> Third, although the 89 ROM was much larger than any of the Z80 ROMs, I
> think the C programming is screwy for ASM programmers because you have to
> push arguments for ROM calls. I admit that this method has its
> advantages, but it is mostly annoying.
The system was never designed with ASM programming in mind. Pushing arguments
onto the stack is standard for processors of this type.
> In addition, I think the ROM
> could have been written much more reliably. I have never had so many
> calculator crashes related to Line 1111 Emulator errors and things like
> that.
Line 1111 Emulator errors are most likely your own fault as they occur when you
try to execute non-instructions.
> It gets so annoying. I have to take a full calculator back up
> every time I add a game to my calculator to make sure I can still recover
> my programs after the inevitable crashes. I'm still angry that you lose
> your archive memory in addtion to the normal memory, although I can see
> why.
Well, that's hardly the CPU:s fault... :o)
> Also, why is this language so ugly? It just looks terrible compared to
> Z80. You might think they would have logical mneumonics, and instead of
> packing all 13 or whatever different address modes, have different
> mneumonics for them. For example, I like my imaginary instruction:
>
> PUSH.W d0,(a0)
>
> much better than:
>
> MOVE.W do,(a0)-
>
> It makes it much easier to remember commands. I think I'll just leave
> the ASM up to TI-GCC
As with any language it's something you get accustomed to... the Z80 and 68000
are two different types of processors, after all: the Z80 has an accumulator
structure whereas the 68000 is based on general-purpose registers.
In this particulat case you should be able to write a macro that lets you write
PUSH instead, though.
I personally think Z80 is ugly, but I haven't programmed anything in it and
don't want to start a flame war on the list :)
/ Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:
Madame Tracy had even removed most of the Major Arcana from her Tarot card
pack, because their appearance tended to upset people.
-- (Terry Pratchett & Neil Gaiman, Good Omens)
Follow-Ups:
References: