A89: More Help


[Prev][Next][Index][Thread]

A89: More Help




Hope you guys don't mind a few beginner questions...

I mostly have questions about nostub-specifics and compiler syntax.

First, what is the overall format of a nostub assembly program (I've found 
examples of nostub C programs...but any assembly stuff I've found has assumed 
you're writing for a shell)?  Also, what things should I be concerned with in 
a nostub program (this is a pretty vague question...)?  For example, can I 
make references to in-program addresses by their label directly, or must I 
use the x(PC) effective address method, or some other method...?  Like in 
ZShell you had to add the program's address to the relative address of the 
label to access in-program data, and in Usgard you simply preceded references 
to such addresses by an amperstand so the compiler could create a relocation 
table.  I'm thinking in-program branching (both jumps and calls), from what 
I've gathered, doesn't need any sort of relocation, since those instructions 
are relative anyway...but correct me if I'm wrong on this ;)

Also, where could I get a list of ROM functions and RAM locations?  I think 
it was at 89 Central that I read that it's probably safe to directly access 
the ROM function table and RAM addresses, since it would be unlikely for TI 
to change these in future AMS versions...true?  Comments?  I checked the 
doorsos include file for assembly files in TI-GCC, and it just equated ROM 
functions to what looks to me like other labels (_ROM_CALL_xxx)...why's that?

One thing I noticed while reading on programming for the TI-89/92(+) is that 
there seems to be three different types of labels used in source codes.  
Those whose (I'm guessing) addresses appear in the header of the compiled 
program (preceded with the compiler directive "xdef" at the top of the source 
and starting with an underscore [is that underscore necessary?]), the 
"regular" ones that are just like "label:", and those that start with a 
backslash, like "\loop:".  Is there a fundatmental difference between these 
labels, or are the prefixes (or lack thereof) there merely for source 
readability?

Also, is there some document that explains all the compiler directives and 
syntaxes available with the a68k assembler?  Like for TASM there was 
"tasm.doc" that gave all available compiler directives listed 
alphabetically...that thing helped me a lot ;)  The "readme.txt" doesn't seem 
to help much, but maybe I'm just not looking hard enough...

Oh, one more question (for now).  I'm not really familiar with mixing 
high-level languages with assembly language; all I really know is that the 
<asm(" ")> function (?) allows one to include assembly instructions in C 
source code.  But how would one go about communicating information between 
the C code and the assembly code?  I'm guessing the route to go would be the 
stack...such as with functions...but how would you write an assembly function 
that C code could utilize (format/syntax?)?

Sorry if these questions are...well..."obvious", but maybe my ignorance is 
due to my attempt to form parallels between the Z80/TI-85 and the M68K/TI-89 
;)  If someone would be willing to help me get on my feet directly through 
email/AIM, be my guest ;)

Thanks,

JayEll



Follow-Ups: