Re: [cc65] Calling another program: exec() ?

From: Oliver Schmidt <ol.sc1web.de>
Date: 2011-01-24 18:19:40
Hi,

> I recall we were doing this sort of stuff using page two and three locations, back in the days.

Same on the Apple II.

>> The best idea would probably be to actually terminate the running program and
>> run a new one instead, eventually passing some arguments as if they were
>> passed on the "command line". This is the easiest and cleanest solution.
>
> This seem to fit into the same place as the stub-loader you mentioned. Get into "safe" place then exit the caller plus load'n run the callee. All in one chunk seems to be the least "nasty" approach.

In order to need as little space as necessary "somewhere" my Apple II
approach is to do the checking for the load address and opening of the
file from within the still running program and to jump to "somewhere"
just-in-time to do the actual loading and final jumping.

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Jan 24 18:19:48 2011

This archive was generated by hypermail 2.1.8 : 2011-01-24 18:19:51 CET