Re: LF: Exit to Fargo shell, not OS
[Prev][Next][Index][Thread]
Re: LF: Exit to Fargo shell, not OS
> > So is this what I would do to boot up fargo shell instead of leaving to
> > normal OS?
> >
> > Prog_code:
> > ....
> > exit:
> > exec(int handle) ;except this will not compile with a68k errors out.
> > ...
> > end
> >
>
> Almost. Rewrite the part called (int handle). 'int' means integer, or
> a 16-bit word. I think (correct me if I'm wrong) that this should be
> the program name. 'handle' just tells you that the program handle goes
> there. Read the file 'CORELIB.FN' which came with Fargo, and also the
> header of 'ROMLIB.FN'.
Correct me if I'm wrong, but the functions in ROMLIB.FN and CORE.FN are
written using the C calling convention, but this convention isn't
actually used in the assembly code. You push the arguments onto the
stack (from right to left, I think), and then call the function like
you normally would, i.e.
jsr core[exec]
Of course, you'd need to use core[find_var] to get a valid variable
handle first.
Later,
-------------------------------------------------------------------
Josh Hays | jhays@teaser.fr
Paris, France | http://www.brownell.edu/~johays
American School of Paris | http://www.teaser.fr/~jhays
"Id quod fuimus aut sumus, non cras erimus." -Ovid
-------------------------------------------------------------------