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






>
>> Van: Joe Pemberton <dArkSk8eR@buffbody.com>
>> 
>> >
>> >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
>
>He just explained the way it works on (about) all the Ti85 shells and one
>(older) Ti82 shell. But if you already know a fixed adress then you only
>need to assemble the file with a correct originate, off coarse.
>
>Do you say he should cut his program into (approx.) 768 bytes pieces? So he
>could calculate where these currently are in memory (inside his program),
>then copy one of them to some buffer and execute it from there, return, do
>it over with the next part of the program, etc. ??? That would be pretty
>bogus sizewaste.

No, no.. that's not what I meant.  I haven't read this entire thread, but
as far as I know the question was of setting up external
routines/subprograms somewhere outside of your program so it could handle
running other ASM programs.  A loader program like this would easily fit
within 768 bytes.
- - Joe

>
>'Even' using Venus would be better then. I guess that's the best thing to
>do, strip off all the 'load' that you don't need from the Venus kernel, and
>use that to start your program.
>
>I could post some program (137+5+name bytes big) like that here, and a
>'slightly' adapted version would work as ZASMLOAD replacement (bigger). But
>I don't know if Tijl C. minds if I do (don't think he does, but...)
>
>	Henk Poley <><
>
>
>

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