0 Members and 3 Guests are viewing this topic.
Quote from: Scout on January 31, 2011, 08:49:35 am2. Did anyone ever request a Axe( command?;What would Axe( do? If you mean compiling a source from third-party programs, I suggested being able to do that in ASM Doing that for BASIC would require a parser hook, though.Quote from: Scout on January 31, 2011, 08:49:35 am3. Are there special getkeys for stuff like 2ND+MODE, or do we have to set a variable when 2ND is pressed?.In ASM, there are several ways to get a key. There's low-level key reading, where you're reading the port directly, _GetCSC, where you're reading each key stroke (this is what Axe uses for getKey, so no 2ND+[MODE] combos), and _GetKey, where you're waiting for a key combo. In other words, _GetKey pauses the program until the next keystroke (no loop required), and if it's a 2ND or ALPHA, it sets the 2ND or ALPHA flag and waits for the next key. Kind of like in the TI-OS, basically.There could be problems with implementing _GetKey in Axe, though. First of all it has problems of its own. If you do a bcall(_GetKey) in your program and the user presses 2ND+[OFF], the calculator turns off, quitting the program and causing you to lose RAM (since you didn't quit correctly). There are ways to get around that, either with more code or with the undocumented instruction.If you want to try _GetKey for yourself, here's the hex for it: Asm(EF72496F2600)→KIf you want to try _GetKey without the 2ND+[OFF] thing: Asm(EF0B506F2600)→K
2. Did anyone ever request a Axe( command?;
3. Are there special getkeys for stuff like 2ND+MODE, or do we have to set a variable when 2ND is pressed?.
If getKey(54) and getKey(1). CODEEnd
Quigibo: if possible can axe eventually have a Select/Switch case structure? Y'know like in C/C++/Java/all that good stuffzMaybe like:Code: (POSSIBLE AXE SWITCH FORMAT) [Select]Switch(X)Case 11->YCase 23->ZCase 5X-Z->YCase ElseSin(Cos(Sin(Cos(X))))->YEnd
Switch(X)Case 11->YCase 23->ZCase 5X-Z->YCase ElseSin(Cos(Sin(Cos(X))))->YEnd
A switch statement for generating optimized assembly using vector tables would be very used, indeed.
I would love switch statements.
As would I, there are some things Axioms can't do
Since forever ago, I still want them too.
We've had this much support for them before, and he hasn't added them. Let's hope this time, the tide's changed!
Quote from: ztrumpet on January 31, 2011, 10:24:25 pmWe've had this much support for them before, and he hasn't added them. Let's hope this time, the tide's changed! *tiDE
rand^9+1!If -1Do stuffReturnEnd!If -1Do stuffReturnEnd!If -1Do stuffReturnEndand so forth...
Depending on the environment you are in it is currently possible to *sort of* do switch statements...or at least a more optimized form of what we do now (this is something Runer112 taught me by the way).Code: [Select]rand^9+1!If -1Do stuffReturnEnd!If -1Do stuffReturnEnd!If -1Do stuffReturnEndand so forth...You can replace the Returns with Goto's if you want. The important thing is that you have to get out of the whole code block after you're done otherwise it won't work.