Re: A89: Re: evaluating expressions


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

Re: A89: Re: evaluating expressions




In case someone didn't notice you can't use these asm statements in
a68k... it's gas' format. Btw, is lea "better" than addq when adjusting
the stack pointer?

Zeljko Juric wrote:
> pea expr(pc)
> jsr tios::push_parse_text
> move.l tios::top_estack,-(sp)
> jsr tios::NG_rationalESI
> lea (sp,8),sp
> ....
> expr: .ascii "X^2+3"
> dc.b 0

pea expr(pc)
jsr doorsos::push_parse_text
move.l doorsos::top_estack,-(a7)
jsr doorsos::NG_rationalESI
lea (a7,8),a7
....
expr: dc.b "X^2+3",0

[snip]
> pea var(pc)
> move.l tios::top_estack,-(sp)
> jsr tios::estack_to_ushort
> lea (sp,8),sp
> move.w var,d0
> ....
> var:dc.w 0

pea var(pc)
move.l doorsos::top_estack,-(sp)
jsr doorsos::estack_to_ushort
lea (a7,8),a7
move.w var,d0
....
var:dc.w 0



-- 
Scott "Wrath" Dial
wrath@calc.org
ICQ#3608935
Member of TCPA - tcpa.calc.org
_____________________________________________
NetZero - Defenders of the Free World
Click here for FREE Internet Access and Email
http://www.netzero.net/download/index.html



References: