From: | Frank Wille |
Date: | 16 Jul 2000 at 18:34:05 |
Subject: | Re: Run68k yet a trouble |
Joseph Fenton wrote:
> Almos Rajnai wrote:
>
> ...
>
> > backcall: moveq.l #36,d0 rts
>
> ...
>
> > lwz _d0,@_backcall(rtoc) stw _d0,PP_CODE(r1)
>
> ...
>
> > So, what is wrong with it? Calling requires an exact PowerOpen
> > stackframe? Or what else?
>
> Well, when I was doing mixed assembly similar to what you were doing, I
> found that you need to make a variable in the data area (in the 68K
> part) like -
>
> backptr dc.l backcall
>
> Then access it like -
>
> lw _d0,backptr
>
> This was in PowerASM; I can't imagine vbcc/pasm/phass would be any
> different other than slightly different syntax.
This was already correct what he did. He used the "@_backcall"
symbol, which contains a pointer to "backcall". When there is a
reference to such a "@_"-symbol, vlink will create it automati-
cally during the linking process. StormLink does the same, AFAIK,
so there is no need to do it manually like you did.