Re: A86: running a BASIC program


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

Re: A86: running a BASIC program




> how would I run a BASIC program from an assembly program?

Here is the routine I use, it's bug free I think, and it's safe:

;OP1 = prog name
exec_basic:
 bit ProgramExecuting,(iy+NewDispf)
 push af
 set ProgramExecuting,(iy+NewDispf)
 call _clrWindow     ;optional
 call _runIndicOn    ;optional
 call _PARSEINP
 in a,(5)
 cp $0d
 ld a,$0d
 out (5),a
 jp nz,_JforceCmdNoChar
 pop af
 ret nz
 res ProgramExecuting,(iy+NewDispf)
 ret

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



References: