Re: A89: Re: Re: Showing Var-Link dialog
[Prev][Next][Index][Thread]
Re: A89: Re: Re: Showing Var-Link dialog
On Sat, Jul 15, 2000 at 10:59:47 +0200, Zeljko Juric wrote:
>
> Hi!
>
> > I can't get it to work. I use the -outputbin option in TI-GCC,
> > [...] I even got a neat flashing, moving address error once.
> > Does anyone know where my mistake is? [...]
>
> Huh, huh... I am afraid that I know what is wrong. Exec strings
> must consist of absolutely position-independent machine code (e.g.
> everything must be done exculusively using relative addressing).
> [...] and TIOS relocates ASM program properly [...] before executing.
EXEC strings are handled exactly like ASM-programs, i.e. they are relocated
and everything (AMS <=2.03, MOST likely 2.04 too).
EXEC strings:
code-code-code-... $0000 AMS-relocations
ASM programs:
length-info-for-AMS code-code-code-... $0000 AMS-relocations tag
(The "AMS-relocations" part is scanned backwards until the "end indicator",
$0000, is found. Note that only "nostub" programs use this method, kernel-
based programs store relocation entries in a special header in the code and
the kernel relocates them. This method is slightly more space-efficient.)
I suppose you could use the -outputbin option, as long as you remove the
terminating tag ("F3") and the length info (if present). For kernel-based
programs, [I believe] the code always starts with "61" (a BSR across the
header) and there are no "AMS-relocations".
The resulting EXEC string should then look like "61...lots.of.chars...0000".
If the above doesn't work, please compile the following minimal program and
send the resulting hex code to me:
/* Don't forget to mention _ti89 etc if neccy,
I don't know what it takes to make TI-GCC happy! :-) */
int main(void) { return 0x1234; } /* sic */
/Johan
Follow-Ups:
References: