Good evening everyone,

As of recently I have been going through 'Zeda's Hex Codes' from Ticalc.org http://www.ticalc.org/archives/files/fileinfo/434/43489.html


And must say, if you are learning Hexadecimal Asm, this is THE holy grail of knowledge- Shout-out to Zeda for being such a team player with this


So have been 'reverse engineering' all of these, and am picking up the Syntax, program format, intricacies which no tutorial I have found could match.


ANYWAY, I worked through most of them without problem, but ended up stuck at this one
________________________________________________________


"RepeatyKeys ;This lets all keys repeat... ;Super fast... ;Not really practical ;D ;Run the code again to deactivate "


Code:
AsmPrgm
180A      //Jr *
83      //add a, e
47      //ld a,b
3A4584   //ld a,(**) /*Load value at address ** into A */
323F84   //ld (**),a /*Load A into address at pointer **   
78      //ld a,b
C9      //ret
210080   //ld hl, **
7EFE83   //ld a, (hl)
2006      // Jr nz, *
AF      // Xor A
77      // ld (hl),a
323F84   // ld (**),a
C9      //ret
11979D   //Ld de, **
EB      //ex de, hl
018000   //ld bc,**
EDB0      //*BIT* res 6,b
DB06      //in a,(*)
210080   //ld hl, **
EF664F   //EnableRawKeyHook
C9      //ret


________________________________________________________

I took the liberty of translating all the Hex to the side; I am reading through this, but cannot understand why things are in the order they are in; example, what purpose does the "add a,e" in the beginning serve? I remember reading it somewhere that hooks need it for some reason, but why?

Plus if somebody can explain why Ti doesnt like to talk about these, I'm stumped on that as well

So overall if anybody could explain any of the above that would be LARGELY appreciated Razz
The reason you need the $83 (add a,e) is so that the OS knows it's a hook and not a random place in memory. It doesn't actually get run, it just identifies the code section as a hook. If the address the hook was loaded to got overwritten then it'd likely crash your calc, so it's really just a simple safeguard.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement