What is the best way to run an assembly program as a subroutine in C?
Also: What is the best way to run a BASIC program?
I mean, where do I put the code? And what code to I use?
This is the code I have currently.
Code:
Any suggestions?
Also: What is the best way to run a BASIC program?
I mean, where do I put the code? And what code to I use?
This is the code I have currently.
Code:
ld hl,-64
add hl,sp
push hl
pop de
ld sp,hl
push de
ex hl,de
ld hl,.stub
ld bc,64
ldir
ld hl,(ti.asm_prgm_size)
ld de,userMem
call ti.DelMem
call ti.ChkFindSym ; name is already in OP1
ld hl,(hl)
push de
push hl
call ti.InsertMem
pop bc
ld (ti.asm_prgm_size),bc
pop hl
ld de,ti.userMem
ldir
ld hl,.name
call ti.Mov9ToOP1
ld hl,.name
call ti.PushOP1
jp ti.userMem
.name:
db 6,"BOSSHELL"
.stub:
ld hl,(ti.asm_prgm_size)
ld de,ti.userMem
call ti.DelMem
call ti.PopOP1
call ti.ChkFindSym
ld hl,(hl)
push de
push hl
call ti.InsertMem
pop bc
pop hl
ld de,ti.userMem
ldir
ld hl,64
add hl,sp
ld sp,hl
jp ti.userMem
Any suggestions?