IOHook v0.02a
Brandon Wilson

>What is it?
This is a very nasty OS patch which allows an SE/84+ calculator to intercept OS requests to send or receive bytes through I/O by adding what I call an "I/O hook" to the OS. This opens up the possibilities of transferring variables, certificate revisions, etc. to yourself, as well as I/O logging for debugging/development purposes.

>How do I use the application?
Run it from the APPS menu and choose "1) Install" to install it.
Note: it WILL take a long time to install (and/or uninstall). This is normal.

To begin logging of I/O sends/receives, select "3) Start Log". To stop it, select "4) Stop Log".

Start logging and then begin an I/O transfer, such as from the LINK menu or with a PC. You can then view the log by selecting "5) View Log" and seeing what was sent and received from each end.
Pressing UP and DOWN in the log viewer will scroll up and down, and [-]/[+] will scroll 7 lines at a time.

Select "6) Demos" for some neato things this could be used for, such as transferring variables to yourself (for sending them directly to the archive, creating groups, etc.).
"1) Self Transfer" will create an archived program called prgmA with "HI" in it by initiating a silent link transfer and then handling both the sending and receiving ends of the communication, all oncalc.

>How do I use the hook?
Here is the hook documentation:
I/O Link Hook:
Hook block: 9BD8h
Hook active flag: 1,(iy+3Ah)
This hook is called when bytes are sent and/or received over the I/O link port.
B=1: The calculator is about to send a byte. The byte is in A. You can change it if you want. Return NZ to cancel sending.
       This event fires when _SendAByte/_SendCByte are first called.
B=2: The calculator is finishing the receive of a byte from the silent link.
       This will be the first byte from a silent link packet. You can return NZ and the byte in A to "fake" receiving whatever you want.
       This event fires when _ContinueGetByte is first called.
B=3: The calculator has started waiting to receive a byte. This is usually the first byte in a link transmission or packet.
       You can return NZ and the byte in A to "fake" receiving whatever you want.
       This event fires when _Rec1stByte/_Rec1stByteNC are first called.
B=4: The calculator is receiving a byte. You can return NZ and the byte in A to "fake" receiving whatever you want.
       This event fires when _RecAByteIO is first called.
B=5: The calculator is sending a 4-byte packet. You can return NZ to cancel sending, but don't unless you have a really good reason.
       This event fires when _Send4Bytes is first called.
B=6: The calculator has finished receiving the first byte from the silent link detection. This will be the first byte from a silent link packet. You can change the value of the byte received in A.
       This event fires when _ContinueGetByte is returning.
B=7: The calculator has finished receiving the first byte of a link transmission or packet. You can change the value of the byte received in A.
       This event fires when _Rec1stByte/_Rec1stByteNC is returning.
B=8: The calculator has finished receiving a byte over I/O. You can change the value of the byte received in A.
       This event fires when _RecAByteIO is returning.

Keep in mind that this is not your typical OS hook, and it has no OS support...so if you have an application with a hook like this, and a defragment happens, the hook is no longer valid.
It's meant to be more of a temporary "I can finally make the OS do this just this one time" kind of thing.

>How can I contact you?
brandonlw@gmail.com, brandonw.net, etc.

>Version History
v0.02a Changelog
Added I/O logging (to RAM pages 84h-87h) and log viewer
Added demos section to demonstrate the ability to transfer to yourself

v0.01a Changelog
Initial release
