[A83] Re: Executing a BASIC program that executes an ASM program...


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

[A83] Re: Executing a BASIC program that executes an ASM program...




Why not just:

ld hl,BASIC
rst 20h
set ProgExecuting,(iy+newDispF)
B_CALL ParseInp
ret
res ProgExecuting,(iy+newDispF)

StateSet2:

BASIC: db ProgObj,"BASIC",0

/David
Cirrus Programming, http://cirrus.tigalaxy.com

----- Original Message -----=20
From: "Thomas Lutz" <tlutz@stevens-tech.edu>
To: <assembly-83@lists.ticalc.org>
Sent: Sunday, January 20, 2002 1:19 AM
Subject: [A83] Executing a BASIC program that executes an ASM program...



Would it be bad to execute a BASIC program that ran an ASM program from
within an ASM program? Is the following code correct?

ld hl,BASIC
ld de,OP1
ld bc,7
ldir
bit ProgExecuting,(iy+newDispF)
push af
set ProgExecuting,(iy+newDispF)
B_CALL ParseInp
pop af
jr nz,StateSet2
res ProgExecuting,(iy+newDispF)
StateSet2:

BASIC: db ProgObj,"BASIC",0


Also, what happens when an ASM program executes? How is the memory
deallocated and what could prevent it from being deallocated? Thanks

Tom









References: