A89: Re: Re: Another question...


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

A89: Re: Re: Another question...




OK, I'll give it a go... just the list though, the formats are pretty well
explained...

------------------------------

>  Format of 89 and 92+ ASM files
>  ------------------------------
>
>Sorry this file is not very well explained yet.
>
>
>Offset Size Desc
>--------------------
>$0 4 Bsr to the loader code

First instruction that is executed when the program is branches to the loader
code, which in turn relocates the program, allocates memory for BSS block if
used, then runs the program, then unrelocates it and de-allocate the BSS block.

>$4 4 68k ASM Signature "68kP" or "68kL"

Not sure if this is DoorsOS-specific, but it tells us what kind of asm file this
is.

>$8 2 Reloc count

Relocation Counter... keeps track of how many times this program/library is used
by other programs/libraries. It's only actually *relocated* once, and not
unrelocated until this counter reaches zero again.

>$A 2 offset to _comment
>$C 2 offset to _main
>$E 2 offset to _exit

Offsets from the first word of the file to the respective xdefs, i.e. start of
the _comment string = Start of file+offset to _comment.

>$10 2 compatibility and special flags
>   bit 0 - runs on 92+
>   bit 1 - runs on 89
>   bit 15 - TI-89 emulation (force 89 screen size on 92+)

Pretty self-explanatory.

>$12 2 handle of BSS block ; when program is in use

If the program uses a BSS block the handle of its memory area is stored here to
be able to de-allocate it when done.

>$14 2 offset to BSS table
>$16 2 offset to export table
>$18 2 offset to Extra RAM table

Again, offset from the start of the file, this time to the tables that tell
DoorsOS what the BSS variables look like, what library calls we use and where
they are, and what extra RAM functions we have defined.


 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

By and large, the only skill the alchemists of Ankh-Morpork had discovered
so far was the ability to turn gold into less gold.
        -- (Terry Pratchett, Moving Pictures)




References: