0 Members and 6 Guests are viewing this topic.
[00]->Str1Str1->Str2
Quote from: thepenguin77 on February 20, 2012, 03:58:26 pmI found an error in the way the token hook is handled. When you copy the text string to ram, I noticed that you don't actually configure the first byte of the string. Since most of the tokens end up being somewhere in the 01xx range, the first byte of the ram string is 1.But here's the problem. On closer analysis of how this hook works, that first byte actually means something. The format looks like this:[Key code][length of string][string]Where key code is the actual key you press to signal the token. As you can see, the key codes you are returning are incorrect and then that leads to all sorts of problems. (01 translates to right, when you use axe tokens in a Recall queue, the calculator hangs because tokens aren't actually being inserted)So the simple fix is just to put the proper key codes in. The quickest way to get the proper key code is to simply put the token in DE and call _GetKeyPress, that will return the proper key in A.Edit: If you are going to call _GetKeyPress from within your hook, make sure you temporarily disable the hook. Otherwise you're going to have fun with recursion.Can you elaborate on this problem? I haven't noticed any problems with the hook in my testing of it. And I can't seem to cause any problems by recalling strings that contain Axe tokens or by entering Axe tokens into the recall prompt.
I found an error in the way the token hook is handled. When you copy the text string to ram, I noticed that you don't actually configure the first byte of the string. Since most of the tokens end up being somewhere in the 01xx range, the first byte of the ram string is 1.But here's the problem. On closer analysis of how this hook works, that first byte actually means something. The format looks like this:[Key code][length of string][string]Where key code is the actual key you press to signal the token. As you can see, the key codes you are returning are incorrect and then that leads to all sorts of problems. (01 translates to right, when you use axe tokens in a Recall queue, the calculator hangs because tokens aren't actually being inserted)So the simple fix is just to put the proper key codes in. The quickest way to get the proper key code is to simply put the token in DE and call _GetKeyPress, that will return the proper key in A.Edit: If you are going to call _GetKeyPress from within your hook, make sure you temporarily disable the hook. Otherwise you're going to have fun with recursion.
I think in the process of fixing replacements in Axioms in 1.1.0, another bug was introduced. Now, if I reference an Axe command or another Axiom command in my Axiom, I get two copies of the referenced command in the compiled code.
Is axe 1.1.1 known to be buggy with arbitrary buffers?
Subroutine______Bytes_________________sub_mul 24sub_div 26sub_sdiv 38
Subroutine______Bytes_________________sub_mul 18sub_div 46sub_sdiv 35