🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TPA pointer

#28236
From: Allan Pratt
Date: Mon, 14 Sep 1987 18:03
29 lines
1795 bytes
in article <3059@mtgzz.UUCP>, bds@mtgzz.UUCP (b.d.szablak) says:
> Using MONST I determined that the error was occurring because the value
> I was using for the TPA pointer (passed on top of the stack at startup)
> was 0L!

The basepage pointer is at 4(sp), not "the top of the stack" as you say.
This is so it can be taken as the argument to a C procedure like this:

	_main(basepage)
	long *basepage;
	{
		...
	}

When the compiler compiles this, it expects that the return address from
the "JSR _main" is the long on top of the stack, and the arg is the SECOND
long on the stack (at 4(sp)).

As for the rest of your problem, I have to assume that it is a
misunderstanding between you, GEMDOS, and your debugger.  OF COURSE
programs are being started at their entry points -- otherwise MONST
itself wouldn't work.  But when you start the program with MONST, you
are introducing another player into the game.  I haven't really played
with MONST, so I don't know how far to go with that theory.

/----------------------------------------------\
| Opinions expressed above do not necessarily  |  -- Allan Pratt, Atari Corp.
| reflect those of Atari Corp. or anyone else. |     ...lll-lcc!atari!apratt
\----------------------------------------------/  "Yow! Am I interfaced yet?"
Technical Details
Message-ID: <841@atari.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!amdcad!sun!imagen!atari!apratt
References: <3059@mtgzz.UUCP>

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!husc6!mit-eddie!ll-xn!ames!amdcad!sun!imagen!atari!apratt
From: apratt@atari.UUCP (Allan Pratt)
Newsgroups: comp.sys.atari.st
Subject: Re: TPA pointer
Message-ID: <841@atari.UUCP>
Date: Mon, 14-Sep-87 14:03:33 EDT
Article-I.D.: atari.841
Posted: Mon Sep 14 14:03:33 1987
Date-Received: Thu, 17-Sep-87 02:35:01 EDT
References: <3059@mtgzz.UUCP>
Organization: Atari Corp., Sunnyvale CA
Lines: 29