🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari
Article #2293

Re: calling programs

#2293
From: daemon
Date: Tue, 28 Jan 1986 18:43
20 lines
1989 bytes
>    Anyone out there used the gemdos Pexec command?  It supposedly allows one
>    to call other programs from a main program.  I've tried everything I could
>    think of to get it to work, but I've had no luck.  It keeps returning error
>    code -39.  According to the gemdos manual, this indicates not enough memory.
>    But I know I've got enough memory, becase the main program is about ten
>    lines long and the sub-program is about five lines long and I have a one-
>    megabyte machine!  This is terribly frustrating!  If anyone can offer any
>    suggestions or perhaps a solution, I will greatly appreciate it.
>    -- 
>    
I notice another response to this problem which may or may not be accurate.
According to the spec for Gemdos in the developers kit, when a program is
loaded into memory, the stack pointer is set to point to the top of the TPA.
This means that the program will use all available memory for its heap space.
To make room for a program to be pexec(), the spec says that you should
reduce your stack/heap space by changing the stack pointer to a more reasonable
offset from the end of the bss and free the memory above the new stack pointer
using mfree().  This makes memory available for the pexec()ed program to use.
I believe this is done in gemstart or gems, but I don't have my documentation
with me so I can't be sure.
Technical Details
Message-ID: <269@houligan.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!akguc!codas!peora!ucf-cs!novavax!houligan!daemon

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site houligan.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!akguc!codas!peora!ucf-cs!novavax!houligan!daemon
From: daemon@houligan.UUCP
Newsgroups: net.micro.atari
Subject: Re: calling programs
Message-ID: <269@houligan.UUCP>
Date: Tue, 28-Jan-86 13:43:10 EST
Article-I.D.: houligan.269
Posted: Tue Jan 28 13:43:10 1986
Date-Received: Sat, 1-Feb-86 00:22:46 EST
Sender: daemon@houligan.UUCP
Organization: Gould Electronics, Ft. Lauderdale, Florida.
Lines: 20