Re: A89: Re: Re: ROM calls in Nostub ASM program


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

Re: A89: Re: Re: ROM calls in Nostub ASM program




That would be accurate as long as you include a appropriate header
file... AFAIK would be OS.h... and yes there is a macro named ROM_CALL
that does the indirect calling, etc for you. Although it is written
differently, but how much of an impact is it?

ROM_CALL macro
 move.l ($C8),a4
 add.l #\1*4,a4
 move.l (a4),a4
 jsr (a4)
 endm

I would assume that the effective address clock time would equal out,
but whatever...

Zeljko Juric wrote:
> 
> Hi!
> 
> > Look in the anothermario source code.  It has it in there.
> >
> > Or, I'll just paste you the code here:
> >
> >  move.l $c8,a0
> >  move.l X*4(a0),a0
> >  jsr (a0)
> >
> > X is the ROM call number in the doorsos.h/tios.h document BUT, you MUST
> > convert it to decimal while using this method. (This is from am.zip
> > (another mario source)).  That is the only way I know of that will work.
> 
> I am not so familiar with A68k assembler syntax (I used GNU Assembler),
> but I expect that the following will also work:
> 
> move.l $c8,a0
> move.l DrawStr*4(a0),a0
> jsr (a0)
> 
> And, as far as I know, there is a macro (ROM_CALL or something similar)
> somewhere in ASM header files which does the same thing after the
> expansion, so you can use
> 
> ROM_CALL DrawStr
> 
> > A good friend of mine told me I could do
> >
> >  jsr _ROM_CALL_XXX
> >
> > in _nostub programs when I was endeavoring into _nostub programs but, I
> > could never get it to compile.
> 
> No. You definitely can't do this. _ROM_CALL_XXX are only special symbols
> which are recognized by the DoorsOS linker. They are completely
> meaningless in kernel-less programs.
> 
> Zeljko Juric

-- 
Scott "Wrath" Dial
wrath@calc.org
ICQ#3608935
Member of TCPA - tcpa.calc.org
PGP key available

_____NetZero Free Internet Access and Email______
   http://www.netzero.net/download/index.html



References: