Difference between revisions of "83Plus:Hooks:9BB0"

From WikiTI
Jump to: navigation, search
 
(Comments)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Note:''' Do not take the information on this template page as actual documentation!
+
[[Category:83Plus:Hooks:By_Name|App Change Hook]] [[Category:83Plus:Hooks:By_Address|9BB0 - App Change Hook]]
 
+
The Hooks are named by their hook pointer block address (the four bytes consisting of page, address, and an extra byte), in hexadecimal. An example is [[83Plus:Hooks:9B84]].
+
 
+
----
+
 
+
 
== Synopsis ==
 
== Synopsis ==
'''Name:''' ImAHook
+
'''Name:''' App Change Hook ''(also called the Context Switch hook)''
  
'''Hook Pointer Block Address:''' [[83Plus:RAM:8562|8562]]
+
'''Hook Pointer Block Address:''' [[83Plus:RAM:9BB0|9BB0]]
  
'''Hook Enable BCALL:''' [[83Plus:BCALLs:1234|1234]]
+
'''Hook Enable BCALL:''' [[83Plus:BCALLs:502C|502C]]
  
'''Hook Disable BCALL:''' [[83Plus:BCALLs:5678|5678]]
+
'''Hook Disable BCALL:''' [[83Plus:BCALLs:502F|502F]]
  
'''Hook Call BCALL:''' [[83Plus:BCALLs:9012|9012]]
+
'''Hook Call BCALL:''' ''(none known)''
  
'''Hook Active Flag:''' 6, (iy + 23h)
+
'''Hook Active Flag:''' [[83Plus:Flags:36#Bit_2|2, (iy + 36h)]]
  
This hook allows you to change the values that [[83Plus:BCALLs:4972|GetKey]] returns.
+
This hook is called at any time that TIOS changes from one app to another.  Also called when the calculator is turned off.
  
 
== Using the Hook ==
 
== Using the Hook ==
These different values, passed in a, determines what the hook should do.
+
 
* 1: The calculator just turned on. There seem to be no other values passed to the hook.
+
* B = current app
* 2: The calculator is computing 1+1.
+
** Switching from one app to another: A = new app
** b: 1
+
** Turning the calculator off from most apps: A = 2
** c: 1
+
** Exiting an external app: A = 0
** Change b and/or c to affect the output of the problem (which will still look like 1+1 to the user).
+
** Turning the calculator off from the graph screen (possibly others): A = 0
* 3: Preparing to turn off due to 2nd+OFF.
+
* HL = Address the OS is going to jump to in order to switch to new app (this is a page 0 call)
** Zero flag: Clear to abort the power off.
+
  
 
== Comments ==
 
== Comments ==
This hook doesn't exist. This is a demonstration only.
+
On known monochrome TI-83 Plus/TI-84 Plus calculators, the TI-OS completely ignores the output of this hook. You can force TIOS to go certain apps by using the JForce... B_JUMPs. (These B_JUMPs are probably not intended to be used inside this hook, so this may or may not be safe, depending on the apps involved.) On the TI-84 Plus C Silver Edition, you must preserve A and HL, because the OS does ''not'' ignore these values. However, it's not known if modifying A and HL is a "safe" way to change which new context is launched.
 
+
== Credits and Contributions ==
+
* '''/dev/hda1:''' My favorite hard drive partition.
+

Latest revision as of 07:29, 9 May 2015

Synopsis

Name: App Change Hook (also called the Context Switch hook)

Hook Pointer Block Address: 9BB0

Hook Enable BCALL: 502C

Hook Disable BCALL: 502F

Hook Call BCALL: (none known)

Hook Active Flag: 2, (iy + 36h)

This hook is called at any time that TIOS changes from one app to another. Also called when the calculator is turned off.

Using the Hook

  • B = current app
    • Switching from one app to another: A = new app
    • Turning the calculator off from most apps: A = 2
    • Exiting an external app: A = 0
    • Turning the calculator off from the graph screen (possibly others): A = 0
  • HL = Address the OS is going to jump to in order to switch to new app (this is a page 0 call)

Comments

On known monochrome TI-83 Plus/TI-84 Plus calculators, the TI-OS completely ignores the output of this hook. You can force TIOS to go certain apps by using the JForce... B_JUMPs. (These B_JUMPs are probably not intended to be used inside this hook, so this may or may not be safe, depending on the apps involved.) On the TI-84 Plus C Silver Edition, you must preserve A and HL, because the OS does not ignore these values. However, it's not known if modifying A and HL is a "safe" way to change which new context is launched.