| Ti-83 and Ti-84 Assembly Programming | |
| Getting Started 1.1: About This Tutorial 1.2: About TI-ASM 1.3: Writing Your First Program 1.4: Compiling 1.5: Debugging ASM Basics 2.1: Calls and Jumps 2.2: Registers 2.3: Displaying Text System Controls and Calls 3.1: Data 3.2: Register Stack 3.3: If Statements (Comparing) 3.4: GetKey and GetCSC 3.5: System Flags 3.6: Menus 3.7: Displaying Pictures 3.8: For Loops (djnz) 3.9: White Loops 3.10: OP Registers Applications 4.1: Apps vs ASM 4.5: KeyHooks | KeyHooks The following tutorial is copied from this file TI-83 Plus SDK/Hooks Programming Information There are two kinds of key hooks, RawKeyHook and GetKeyHook. Important: Someone at TI reversed the names, so pay attention. RawKeyHook is executed when _getkey is pressed (on par with it). GetKeyHook is executed constantly (on par with _getcsc). RawKeyHook is the more useful, so we will cover that first.
---RawKeyHook--- A = Key code of the key pressed You will need to have the following as outputs:
A = New key code There are some odd things in the calc's operation. You must have "add a,e" in your routine too. Working sample code is below (disables 2nd+Mem press):
;App header before here ld hl,keyhook ;Load HL with pointer to routine in a,(6) ;Get the current ROM page in A bcall($4F66) ;Call RawKeyHook bjump(_JForceCmdNoChar) ;Return to TI-OS keyhook: ;The actual routine add a,e ;This is required for it to work cp $36 ;Is the key 2nd+Mem? ret nz ;Exit if not xor a ;If so, set zero flag so it doesn't work ret ;Exit |
![]() The text in this tutorial is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. | |

