Re: A86: _exec_basic


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

Re: A86: _exec_basic




_PARSEINP restores the proper rom page unless the stop instruction is
executed. (i think)
it copies three values off the stack onto the op stack (__bank_ret, rom
page, & page $d ret addr)
if it doesn't recieve a stop instruction, it will copy these values back
and return when it reaches the end of the command stream (should be
either on $6f (newline) or $00 (_P_CURPC > _P_ENDPC))
if it does recieve a stop instruction, the op stack is trashed and these
values are lost, then it returns to the next location on the stack which
in this case is your program.

the only basic program the rom executes with this normally is the #
program.

you should probly still save the ops and fps pointers before calling
this, otherwise you'll run into problems if your asm prog is run from
within something else:  (maybe something from like #...)
  ld hl,(_OPBASE)  ; remember to restore the old _OPBASE and _FPBASE!
  push hl
  ld hl,(_FPBASE)
  push hl
  ld hl,(_OPS)
  ld (_OPBASE),hl
  ld hl,(_FPS)
  ld (_FPBASE),hl
;; do your thing
  pop hl
  ld (_FPBASE),hl
  pop hl
  ld (_OPBASE),hl

-josh

On Thu, 2 Mar 2000 08:14:27 -0700 (MST) Kirk Meyer <kmeyer@Mines.EDU>
writes:
> 
> It seems it should work, but it doesn't. _parseinp seems to mess 
> with the
> stack so that it bypasses the usual return. The syntax error is 
> caused by
> the PC for entry being changed by calling the _parseinp function. 
> Clem's
> post to the list may work to fix this (haven't tried it yet), but 
> _jforce
> isn't a bad aidea, for shells at least...
> 
>   Kirk
> 
> On Wed, 1 Mar 2000 rabidcow@juno.com wrote:
> 
> > 
> > _PARSEINP uses __bank_call, which should return the proper rom 
> page,
> > right?
> > _PARSEOFF does the same thing as _PARSEINP, except it doesn't 
> reset some
> > flags first.  does this one work?
> > what causes the syntax error?
> > 
> > -josh
> > 


________________________________________________________________
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.


Follow-Ups: