[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
>
seems like that'd be a lot of work when you could just write the routines
from .org $9872 or .org $86ec and have 768 bytes of mem to run them from =)
But if you were to install the routines in a stack somewhere or in some
free mem somewhere, then you would need to fix all the absolute addresses.
- - Joe


--------------------------------
Joe Pemberton
http://tiworld.calc.org
--------------------------------


_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com





Follow-Ups: