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

From WikiTI
Jump to: navigation, search
m
 
Line 1: Line 1:
'''Note:''' Do not take the information on this template page as actual documentation!
+
[[Category:83Plus:Hooks:By_Name|USB Activity Hook]]
 
+
[[Category:83Plus:Hooks:By_Address|9BD4 - USB Activity 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]].
+
 
+
You must also include a variation on the following code to put your documentation into the appropriate Category listing:
+
NaodW29-nowiki5f2603d84685f5ec00000001
+
Change the address and name to match your hook.
+
 
+
----
+
 
+
 
== Synopsis ==
 
== Synopsis ==
'''Name:''' ImAHook
+
'''Name:''' USB Activity Hook
  
'''Hook Pointer Block Address:''' [[83Plus:RAM:8562|8562]]
+
'''Hook Pointer Block Address:''' [[83Plus:RAM:9BD4|9BD4]]
  
'''Hook Enable BCALL:''' [[83Plus:BCALLs:1234|1234]]
+
'''Hook Enable BCALL:''' [[83Plus:BCALLs:528A|528A]]
  
'''Hook Disable BCALL:''' [[83Plus:BCALLs:5678|5678]]
+
'''Hook Disable BCALL:''' [[83Plus:BCALLs:528D|528D]]
  
'''Hook Call BCALL:''' [[83Plus:BCALLs:9012|9012]]
+
'''Hook Call BCALL:''' ''(none known)''
  
'''Hook Active Flag:''' 6, (iy + 23h)
+
'''Hook Active Flag:''' [[83Plus:Flags:3A#Bit_0|0, (iy+3Ah)]]
  
This hook allows you to change the values that [[83Plus:BCALLs:4972|GetKey]] returns.
+
This hook is called from the interrupt routine when USB activity is detected.
  
 
== Using the Hook ==
 
== Using the Hook ==
These different values, passed in a, determines what the hook should do.
+
* The hook is called whenever any of bits 4-0 of [[83Plus:Ports:55|port 55h]] are low.
* 1: The calculator just turned on. There seem to be no other values passed to the hook.
+
** C holds the complement of these bits.
* 2: The calculator is computing 1+1.
+
* B always contains the constant 2Ch.
** b: 1
+
* Return with B=0 to abort linking, similar to the [[83Plus:Hooks:9BD0|silent link hook]].
** c: 1
+
** Change b and/or c to affect the output of the problem (which will still look like 1+1 to the user).
+
* 3: Preparing to turn off due to 2nd+OFF.
+
** Zero flag: Clear to abort the power off.
+
  
 
== Comments ==
 
== Comments ==
This hook doesn't exist. This is a demonstration only.
+
This hook was introduced in OS 2.30. Apps should check the OS version before attempting to use this hook.
  
 
== Credits and Contributions ==
 
== Credits and Contributions ==
* '''/dev/hda1:''' My favorite hard drive partition.
+
* '''84plusfreak''' -- sorry, I don't know your real name -- discovered and analyzed this hook.

Revision as of 09:20, 28 March 2005

Synopsis

Name: USB Activity Hook

Hook Pointer Block Address: 9BD4

Hook Enable BCALL: 528A

Hook Disable BCALL: 528D

Hook Call BCALL: (none known)

Hook Active Flag: 0, (iy+3Ah)

This hook is called from the interrupt routine when USB activity is detected.

Using the Hook

  • The hook is called whenever any of bits 4-0 of port 55h are low.
    • C holds the complement of these bits.
  • B always contains the constant 2Ch.
  • Return with B=0 to abort linking, similar to the silent link hook.

Comments

This hook was introduced in OS 2.30. Apps should check the OS version before attempting to use this hook.

Credits and Contributions

  • 84plusfreak -- sorry, I don't know your real name -- discovered and analyzed this hook.