Now that I've solved ASM and TI-BASIC program running from C (thanks to everyone who gave me advice on that), the next task is to figure out how to open the TI-OS TI-BASIC editor from C. This is the code I have so far (lifted from BOSshell, with a virtual so that it will compile). This code seems to cause TI-OS to throw an undefined error, even though it opens the program editor. I know I've stored to OP1 correctly before running this code, thanks to the CEmu debugger. For reference, here's the code I have so far:
Code:
I'd appreciate any help with this, or to know if the problem trying to be solved is impossible. Worst case scenario would be scrapping this and just having programs open with KEDIT or another editor, maybe even one that I could make myself.
Code:
public _EditPrgm
include 'include/ez80.inc'
include 'include/ti84pceg.inc'
_EditPrgm:
virtual at ti.cursorImage
; required: OP1 = name of program to edit
edit_basic_program_goto:
ld iy,ti.flags
ld hl,string_temp
call ti.Mov9ToOP1
call ti.ChkFindSym
xor a,a
ld (ti.menuCurrent),a
call ti.CursorOff
call ti.RunIndicOff
ld hl,string_temp
push hl
ld de,ti.progToEdit
call ti.Mov9b
pop hl
dec hl
ld de,ti.basic_prog
call ti.Mov9b
ld a,ti.cxPrgmEdit
call ti.NewContext
xor a,a
ld (ti.winTop),a
call ti.ScrollUp
call ti.HomeUp
ld a,':'
call ti.PutC
call ti.DispEOW
ld hl,$100
ld.sis (ti.curRow and $ffff),hl
call ti.BufToTop
xor a,a
ld (ti.menuCurrent),a
set 7,(iy + $28)
jp ti.Mon
string_temp := ti.cursorImage + $100
load code: $-edit_basic_program_goto from edit_basic_program_goto
end virtual
db code
I'd appreciate any help with this, or to know if the problem trying to be solved is impossible. Worst case scenario would be scrapping this and just having programs open with KEDIT or another editor, maybe even one that I could make myself.