🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.micro.atari
3 messages
3 total messages Started by Eli Liang Sun, 19 Jan 1986 04:03
calling programs
#2150
Author: Eli Liang
Date: Sun, 19 Jan 1986 04:03
17 lines
1489 bytes
*** REPLACE THIS LINE WITH YOUR MESSAGE ***

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.
-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Eli Liang  ---
        University of Maryland Computer Vision Lab, (301) 454-4526
        ARPA: eli@cvl, eli@lemuria, eli@asgard, eli@mit-mc, eli@mit-prep
        CSNET: eli@cvl  UUCP: {seismo,allegra,brl-bmd}!umcp-cs!cvl!eli
Re: calling programs
#2207
Author: Rand Huntzinger
Date: Tue, 21 Jan 1986 14:41
28 lines
2310 bytes
In article <1122@cvl.UUCP> eli@cvl.UUCP (Eli Liang) writes:
>*** REPLACE THIS LINE WITH YOUR MESSAGE ***
>
>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 usually reply to such things privately, but this frustrating problem comes
up with the developer's kit enough to warrant posting a reply.  For those
without the developer's kit, I beg your patience.

For some reason, the "gemstart.o" (or gems.o) module deallocates all but about
1K of user stack/heap space.  Thus, you can have a 1 meg machine with 3/4 meg
free, and still get the out of memory message.  I ran into the same problem
with Pexec() and had other problems as well, until I modified gemstart.s to
allocate more space.  Then the problems went away and I could get on with my
work.  I don't have the code at hand, so I can't give the exact fix.  But
somewhere there is a constant (400 or 500 hex) which gets added to the end of
the program area.  The stack is reset at this point and the rest of memory is
deallocated.  You get to use the space between the end of your code and the
stack pointer.  (400 or 500hex bytes)

					Randy Huntzinger
Re: calling programs
#2239
Author: nigel
Date: Thu, 23 Jan 1986 11:15
12 lines
1244 bytes
In article <1122@cvl.UUCP> eli@cvl.UUCP writes:
>
>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.


A CPM 68K program has all the memory allocated to it, so there is none
left when you try to do a Pexec(). I suspect you have used gems.o, rather
than gemstart.o (if you have the ISV development system), as the latter
reallocates memory for you. Alternatively, use the Mshrink() command.
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