[A83] Re: Running external ASM programs from within an ASM program...


[Prev][Next][Index][Thread]

[A83] Re: Running external ASM programs from within an ASM program...




I forgot to mention...

If it's really important to do this, you can set up
the main program to be able to run specific external
subprograms the following way:

The subprogram must be compiled with .org 0 at
the beginning, and you have to make a list of all
the absolute user RAM accesses in it (call [not
ROM calls, of course], jp, variables, SMC...).
Before calling the program the runner code first
adds the current address of the prog to these values,
and after returning it subtracts this address from
everywhere to restore the whole thing.

I guess that should do.

PG






Follow-Ups: References: