🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #28562

loading and running executables on the atari

#28562
From: Alan P. Sexton
Date: Tue, 06 Oct 1987 08:37
41 lines
2622 bytes
I've just bought an atari 1040st and need some info. If anyone can
tell me this stuff it would save me a lot of detective work.

This is all to do with exactly what happens to a '.prg' file when you double
click it:

I know that there is a header block that has specific info about the
sizes of the text, data and bss areas etc., but I also know that the atari
does not do any address translation and yet, that according to some refs
I have, programs do not know where they will be loaded in memory.
This implies one of the following
a. All programs must be position independant (This could be done
	but I don't believe it is so for the atari).
b. All programs must have their addresses fixed up when they are loaded
	into memory.

Case b would certainly be the way I would do it if it were up to me (given
that I wasn't allowed put an mmu in there) but that opens another question:
are address patches done on the program by pure analysis of the program?
(difficult, costly and inefficient) or is there symbol table info in the
.prg file that allows the system to patch addresses directly?
(seems much more likely).

Finally, Given that a symbol table approach is being used then either
1. TOS understands the symbol table and does the patching itself (in which
	case it must be the same format for all .prg files) or
2. the first part of the program must be a position independant address
	patcher which will understand the 'nonstandard' symbol table format,
	patch the rest of the program and then jump to the start of the
	patched program.

So, can anyone tell me whether 1 or 2 above is correct and if so then what
is the format of the symbol table and position dependant instructions in the
.prg file if case 1 is true.
Also is there anything else in the .prg file which is not header, code or
putative symbol table?

-- 
Alan Sexton				ECRC, Arabellastr 17,
alan@ecrcvax.UUCP			8000 Muenchen 81, West Germany
mcvax!unido!ecrcvax!alan		tel. (089) 92699164
Technical Details
Message-ID: <439@ecrcvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!unido!ecrcvax!alan

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!unido!ecrcvax!alan
From: alan@ecrcvax.UUCP (Alan P. Sexton)
Newsgroups: comp.sys.atari.st
Subject: loading and running executables on the atari
Message-ID: <439@ecrcvax.UUCP>
Date: Tue, 6-Oct-87 04:37:15 EDT
Article-I.D.: ecrcvax.439
Posted: Tue Oct  6 04:37:15 1987
Date-Received: Fri, 9-Oct-87 06:26:38 EDT
Reply-To: alan@ecrcvax.UUCP (Alan P. Sexton)
Followup-To: comp.sys.atari.st
Distribution: world
Organization: ECRC, Munich 81, West Germany
Lines: 41
Keywords: load link exec atari
Summary: How is it done?