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? :)
> TI disallows using ASM programs in expressions starting from AMS 2.xx.
AFAIK, it was *never* meant that we should be able to write asm functions.
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).
And now they (TI) have finally fixed what they forgot/overlooked in 1.xx:
disallowing asm programs in expressions!
Anyway, is sucks. A few simple ways around it is, as you know, to have the
asm program save the return value to a variable, or, there's (in 2.03) a
very simple but limited interface to set or clear the sysvar 'ok' (yes, only
set and clear). I might be possible to use GOTO's from asm-programs to
create, for example, menus with submenus (the kind that ti-basic people keep
asking for) that work very similar to the TOOLBAR command. I haven't tried
it / checked the relevant AMS code parts though.
/Johan
References: