Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Juju on July 02, 2011, 03:10:29 am
-
So the other day I was bored, so I made a neat screensaver in Axe, then I wondered how the program could autorun after some minutes of inactivity. You would use hooks right? So you would put the Axe program somewhere in archive, then install the hook to make the Axe program to execute when the cursor blinks or somethink, and with that you need some asm right?
-
Maybe use the apd timer?
-
Probably. What is it?
-
Well, here's the specifics for the hook. If your going to use it, you can either assemble it yourself, or I'm going to need your program name.
cursorHook:
add a, e
ld a, (apdTimer)
cp $25 ;starts at $74, so...
ld a, b
jr z, isZero
ret nc ;have to ret NZ
isZero:
bcall(_closeEditBuf)
ld hl, programName
rst 20h
bcall(_executePrgm)
xor a
ld (menuCurrent), a
bcall(_jForceCMDNoChar)
programName:
.db protProgObj, "YOURNAME"
cursorHookEnd:
-
So that's the hook installer? It makes prgmYOURNAME run each time the cursor blink? If so, I have to make the program count how much time it had been ran. Also there must be some way to reset the counter when something has been typed?
-
I'm pretty sure it counts how many times the cursor has blinked with inactivity. The timer resets every time a button is pressed. I'm just assuming that though.