Re: A89: Yet another problem with AMS 2.xx


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

Re: A89: Yet another problem with AMS 2.xx




> On Fri, Mar 31, 2000 at 17:26:14 +0200, Zeljko Juric wrote:
> > 
> > [...] The problem is in AMS 2.xx. I found the exact place 
> > which produces the problem: before executing an assembly 
> > program, AMS 2.xx checks whether an assembly program is a 
> > part of the expression.
> 
> AMS 2.03: You mean $256360?  :)

Exactly.

> AFAIK, it was *never* meant that we should be able to write 
> asm functions.

I know this, but I didn't expect disallowing to do this...

> All AMS versions properly restores top_estack to whatever it 
> was before the asm prog was executed, effectively killing any
> pushed return value and resulting in not-so-obvious results 
> like 1+asmprg() = 2, but asmprg()+1 = internal error. The way
> around this (AFAIK again), has been to change the variable 
> that contains the saved top_estack (register variable (don't
> remember which) in 1.0x, in the stack frame at -$40(a6) in 
> 2.03).

The register in 1.0x is A3. But, I implemented RETURN_VALUE
simply by skipping the first instruction after returning from
ASM to TIOS.

> And now they (TI) have finally fixed what they forgot/overlooked
> in 1.xx: disallowing asm programs in expressions!

It sucks.

> Anyway, is sucks.

Yes, it sucks.

> A few simple ways around it is, as you know, to have the asm 
> program save the return value to a variable.

This is not what I want :-(

Zeljko