[A86] Re: assembly, programing and games


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

[A86] Re: assembly, programing and games





On Mon, 12 Mar 2001, Henk Poley wrote:

> Well the z88dk uses a linker, it should be 'easy' to read from the object
> files created by the assembler where the call's and jump's point to and put
> that into the "UsGard-header" (Ti-85...)
> You will need to change the linker... But what support does that add?
> Are there any other platforms/OSes that use such a system?

Well, adding relocation would at least add Usgard support (and, in fact,
full Rigel support as well; while programs for Rigel are moved to a
constant address, libraries for Rigel use Usgard-like relocation).  I
don't know of any other Z80 systems with relocation, but then again, the
calculators are the only Z80 systems I know of at all, so it wouldn't
surprise me if there are some.  Of course, there are plenty of examples of
non-z80 systems which relocate addresses in programs.

Implementing this sort of support should not be very hard, considering
that the 'z80asm' assembler already mostly supports relocation in that it
generates relocatable object files, which are only fixed to a constant
address by the linker.

> If I understand it right than is Rigel located at the very begining of the
> (useable) RAM, and it copies your program right after that (actualy it does
> this with the whole program-variable). Your program is executed from within
> the programs variable... So Rigel is the first var in memory, then comes
> your program-variable, and "at last" the rest of the vars.
>
> WTF doesn't Ion (Ti-83) do that? It makes programming file-routines much
> easier...

As far as I know, this is correct.  I haven't actually examined memory
when the thing is running, but this does seem to be the only sensible
explanation.  Note also that since TI-85 shells are started by the user
selecting in item from the CUSTOM menu (which has a hardcoded absolute
address written into it) the shell variable itself must not be movable.

As far as Ion, you'll have to ask about that on assembly-83.

> > The TI-86, of course, is a completely different situation.  There, the
> > program is always copied (by the system, when you first run it) into a
> > memory area starting at $D748 in the system page of memory.  This page is
> > completely separate from the memory used to hold variables, so no VAT
> > adjustment is done or is necessary.
>
> So I won't need to worry about code is paged out, because I don't need to
> page in/out the last page (where the executing program is stored). Nice :)

For small programs, you don't.  But don't forget that this memory area is
only about 9K in size, so you can't always put your entire program there.





References: