[comp.sys.amiga.tech] Running one from another.

c8843267@cc.nu.oz.au (07/14/90)

Hi all,
	I've got a problem with the program I'm writing write now, any help
with the below troubles would really help as I'm hoping to sell this thing
when I'm done. Thanks.

	The problem:
	My program must load then at some stage run another program on disk
which is written in assembler (generated by sekav3.2). The first program (the
editor) is written in 3.4a Manx 'C'. Right now I'm trying this by using

	Execute() with the program in assembler as the arguement.

	The problem is that there are random errors usually involving the
sprites that are displayed by the assembler prog. But they are totally random
and don't appear when the assembler prog is run by itself. The only thing I 
could think of is that maybe one program is writing over top of the other
or something. ??????????

	Anyway, what is the right way to run a file off disk from a program
that is executing. ???? Is there a better way than Execute() or can anyone
explain the above. Hope so....

							Adam.

poe@daimi.dk (Peter rb{k) (07/16/90)

c8843267@cc.nu.oz.au writes:

>Hi all,
>	I've got a problem with the program I'm writing write now, any help
>with the below troubles would really help as I'm hoping to sell this thing
>when I'm done. Thanks.

>	The problem:
>	My program must load then at some stage run another program on disk
>which is written in assembler (generated by sekav3.2). The first program (the
>editor) is written in 3.4a Manx 'C'. Right now I'm trying this by using

>	Execute() with the program in assembler as the arguement.

>	The problem is that there are random errors usually involving the
>sprites that are displayed by the assembler prog. But they are totally random
>and don't appear when the assembler prog is run by itself. The only thing I 
>could think of is that maybe one program is writing over top of the other
>or something. ??????????

   Couldn't it be your assembler-program, that has a bug?! Such as writing to
or reading from an address where, there's no memory. I once had a binary-
search routine that once in a while began searching in addreses where I had
no memory installed. The interesting thing was that it could cause the
mouse-pointer to jump around by itself, and that was by *reading* from memory!
This was on an A500 with 1MB.

   My guess would be that your assemblerprogram has some bug that depends on
the location where it's running from.

>	Anyway, what is the right way to run a file off disk from a program
>that is executing. ???? Is there a better way than Execute() or can anyone
>explain the above. Hope so....

   The correct way IS to use Execute(), although it's rather akward in my 
opinion. I think there's a better if you use arp.library...

>							Adam.

  - Peter (poe@daimi.dk)
--
**************************************************************
* "Who other than IBM would want to put a mainframe on       *
*  everybodys desk."                                         *
**************************************************************

FelineGrace@cup.portal.com (Dana B Bourgeois) (07/17/90)

I also think the symptoms sounds like the assembly program has the 
problem.  But I wonder if your assembly program allocates memory
properly for the sprites.  Could it be sometimes allocating memory
that is not in chip?

Dana Bourgeois @ cup.portal.com