Re: A86:New in town "stack pointers"
[Prev][Next][Index][Thread]
Re: A86:New in town "stack pointers"
this method:
ld hl,(_OPBASE)
push hl
ld hl,(_FPBASE)
push hl
ld hl,(_OPS)
ld (_OPBASE),hl
ld hl,(_FPS)
ld (_FPBASE),hl
call _exec_basic
pop hl
ld (_FPBASE),hl
pop hl
ld (_OPBASE),hl
gives an "undefined" error on the last line of the basic program if stop
gets executed.
if you replace the call to _exec_basic (aka _PLOTPARS) with this:
ld hl,error_h
call _insterr ;_pushErrorHandler = $41a1
call _exec_basic
call _removerr ;_popErrorHandler = $41a4
error_h:
all errors, including that one will be ignored.
-josh
On Mon, 21 Feb 2000 19:53:43 -0700 "Kirk Meyer" <kirkmeyer@bigfoot.com>
writes:
>
> Haha, we went through this before! It was already suggested to
> modify the
> stack pointers. Apparently no one bothered to try it. (It is
> possible that
> you might run into other hidden problems even after fixing this, but
> doubtful.) For shells, however, the BASIC loader approach is usually
> the
> best anyway, since you'll want them to be able to run the shell
> simply and
> not with Asm(. The approach of replacing the Stop token and
> installing an
> error handler sounds interesting, but seems a bit too hackish to
> work with
> out a WHOLE lot of effort. Seems to me the easiest route is to
> tinker with
> the stacks...
>
> ----- Original Message -----
> From: David Phillips <david@acz.org>
> To: <assembly-86@lists.ticalc.org>
> Sent: Monday, February 21, 2000 6:45 PM
> Subject: Re: A86:New in town
>
>
> > The problem is with the stack. 'stop' is sort of like
> _jforcecmdnochar in
> > assembly, or how you would do it by hand. Nuke the stack and
> exit. But
> > since you are calling it from an assembly program, and they didn't
> store
> the
> > correct info in ram to return to the assembly program, it screws
> up.
> >
> > Hmm...it just might be possible to go through and replace the
> token for
> > 'stop' with something that would cause an error. And if you
> installed an
> > error handler before you ran the program...
>
>
>
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.