I have a simple raw key hook which should run a no stub asm program. However it gives Error:Invalid. I know the program i am trying to run is not Invalid - i can run it with Asm(). The issue here seems to be the fact that i am calling _ExecutePrgm from a hook. Anyone know how to get around this? It is very important for me to be able to run a program from a hook :/
appvarHOOK:
Code:
Program install:
Code:
Program SHELL:
Code:
appvarHOOK:
Code:
#include "ti84pce.inc"
AppvarStart:
.db $83
ld (plotSScreen),a
cp kPrgm ; was Prgms pressed?
ret nz
ld hl,$D007E0
ld b,(hl)
ld a,kQuit
cp b
jr nz,return
ld hl,ShellPrgm ;actual program running stuff
call _mov9toop1
call _ExecutePrgm
ld a,0
ld (plotSScreen),a
return:
ld a,(plotSScreen)
ret
ShellPrgm:
.db ProtProgObj,"SHELL",0
Program install:
Code:
.nolist
#include "ti84pce.inc"
_FindAlphaUp equ 0020E8Ch
_FindAlphaDn equ 0020E90h
.list
.org UserMem-2
.db tExtTok,tAsm84CeCmp
ld hl,RawKeyHookAppvar
call _mov9toop1
call _ChkFindSym
ex de,hl
push hl
add hl,hl
pop hl
jr nc,appVarInArc
call _Arc_Unarc
call _chkfindsym
ex de,hl
appVarInArc:
ld bc,9
add hl,bc
ld c,(hl)
add hl,bc
inc hl ; bypass size bytes
inc hl
inc hl
call $0213CC
ld hl,InstallProgramName
call _mov9toop1
call _Arc_Unarc
ret
notFound:
.db "AppVarHOOK not found",0
InstallProgramName
.db ProtProgObj,"INSTALL",0
RawKeyHookAppvar:
.db AppVarObj,"HOOK",0
Program SHELL:
Code:
#include "ti84pce.inc"
.org UserMem-2
.db tExtTok,tAsm84CeCmp
ret