A86: Re: _exec_basic


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

A86: Re: _exec_basic




Can anyone try this, it should work with nested basic progs....

 ld hl,ProgTest-1
 rst rmov10toop1
 call BasicExec
 jp _JforceCmdNoChar

BasicExec:   ;OP1=var name
 bit ProgramExecuting,(iy+NewDispf)
 push af
 set ProgramExecuting,(iy+NewDispf)
 call _clrWindow
 call _runIndicOn
 call _PARSEINP
 ld a,$0D
 out (5),a
 pop af
 ret nz
 res ProgramExecuting,(iy+NewDispf)
 ret

ProgTest:
 .db 4,"Test"

----- Original Message ----- 
From: Kirk Meyer <kirkmeyer@bigfoot.com>
To: A86 <assembly-86@lists.ticalc.org>
Sent: Thursday, March 02, 2000 3:35 AM
Subject: A86: _exec_basic


> 
> The mystery is finally solved. We were using the wrong ROM call. The call on
> the 83+ is _parseinp (according to TI), so I searched TI's official
> includes. There it was, _parseinp, location $4C57. Now we knew about $4C57
> before, but it didn't switch back to ROM page $0D, so we thought it caused a
> crash. So, just use this code to execute a BASIC program if the name is in
> OP1:
> 
>      call $4c57
>      ld   a,$0D
>      out  (5),a
> 
> Also, you should flush the menus before executing if you haven't already:
> 
>      call $49dc
> 
> And you MUST exit your program through jforce:
> 
>      jp   $409c
> 
> (If you don't, nothing TOO bad should happen, but you will get an ERROR 07
> SYNTAX)
> 
> I tested this with various programs, compiled and uncompiled, and it seems
> to work all the time.
> 
> Kirk
> 
> 

---
Clem Vasseur <darkclem@wanadoo.fr>
Icarus Productions <http://icarus.ticalc.org>



References: