🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.micro.atari
1 messages
1 total messages Started by daemon Tue, 28 Jan 1986 18:43
Re: calling programs
#2293
Author: 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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads