0 Members and 3 Guests are viewing this topic.
Quote from: Stefan Bauwens on October 02, 2011, 01:03:04 pmThanks, it helped. EDIT:I have another question.I want to save the value of x to a string, so I can see it out of my program. The following doesn't seem to work.Code: [Select]:10->x:x->str1You would have to write code to manually extract the digits, convert to tokens, and put into a TI-OS string variable.Maybe something like this (input is in X, uses 5 bytes at L1 to temporarily store characters):Code: [Select]L1+5→A0→BWhile 1 B+1→B X^10+'0'→{A-1→A}EndIf X/10→XCopy(A,GetCalc("Str1",B),B)
Thanks, it helped. EDIT:I have another question.I want to save the value of x to a string, so I can see it out of my program. The following doesn't seem to work.Code: [Select]:10->x:x->str1
:10->x:x->str1
L1+5→A0→BWhile 1 B+1→B X^10+'0'→{A-1→A}EndIf X/10→XCopy(A,GetCalc("Str1",B),B)
Wow, since I am a newbie to Axe i don't think i understand anything of this. I will try to ofcourse
L1+5→A //Stores a pointer to L1+5 to A.0→B //Stores 0 to B.While 1 //Begin loop B+1→B //Increment number length X^10+'0'→{A-1→A}//Divide number (X) by 10, and take the remainder. The remainder is the last digit of the number (X). Then add the remainder to the value of the character '0', to convert it the correct character. The answer is stored to the location pointed to by A, and the location pointed to by A is decremented by 1.EndIf X/10→X //Loop condition. Checks to see if X is still divisible by ten, and if so, divides by 10 and continues to loop. Otherwise, the loop ends, and the string is created.Copy(A,GetCalc("Str1",B),B) //The data pointed to at A is copied to Str1 for a length of B bytes. Str1 is created being B bytes long, B being the length of the number (X).
You need to remember, that the keys have different numbers, clear is 15.
On the topic of keypresses, isn't there a bug that makes some keys confused with each other? It has happened to me before.
A question : I've got the hex code of a picture, but how can I display it *where I want* on the screen?
I do believe that direct keypresses do not work correctly in fullspeed mode. switch to normal before checking for keypresses
Does Axe handle getKey(#) differently in Full speed mode? It keeps bugging on me whenever I try it..
Quote from: Darl181 on October 03, 2011, 10:37:36 amDoes Axe handle getKey(#) differently in Full speed mode? It keeps bugging on me whenever I try it..I can only think of two things that could be causing this. Either Axe is having problems and parsing your code incorrectly, or your calculator is running substantially faster than 15MHz and the built-in delay isn't enough. I'm guessing that it's the second case, especially if you're using wabbitemu. If so, make sure that you didn't enable the option called "Emulate 20MHz and 25MHz calculators" or "Emulate proposed hardware speeds" because having this checked would certainly cause your problem.