Author Topic: Features Wishlist  (Read 694571 times)

0 Members and 2 Guests are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Features Wishlist
« Reply #1815 on: January 31, 2011, 09:35:04 am »
2. 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 :D Doing that for BASIC would require a parser hook, though.

3. 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)→K

If you want to try _GetKey without the 2ND+[OFF] thing: Asm(EF0B506F2600)→K

Axe( would compile and run (consecutively).

Thanks for the getKeys explanation, I'll probably do sth like that.

Code: [Select]
If getKey(54) and getKey(1)
. CODE
End

Which would require it to be simultaneous (what I want).

Ashbad

  • Guest
Re: Features Wishlist
« Reply #1816 on: January 31, 2011, 09:44:01 am »
Quigibo: if possible can axe eventually have a Select/Switch case structure?  Y'know like in C/C++/Java/all that good stuffz

Maybe like:

Code: (POSSIBLE AXE SWITCH FORMAT) [Select]
Switch(X)
Case 1
1->Y
Case 2
3->Z
Case 5
X-Z->Y
Case Else
Sin(Cos(Sin(Cos(X))))->Y
End

So I'm guessing that because my idea was completely ignored it was a really bad one?

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: Features Wishlist
« Reply #1817 on: January 31, 2011, 09:49:20 am »
A switch statement for generating optimized assembly using vector tables would be very used, indeed.
Hobbing in calculator projects.

SirCmpwn

  • Guest
Re: Features Wishlist
« Reply #1818 on: January 31, 2011, 09:15:11 pm »
I would love switch statements.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Features Wishlist
« Reply #1819 on: January 31, 2011, 09:17:42 pm »
As would I, there are some things Axioms can't do

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #1820 on: January 31, 2011, 09:46:26 pm »
Since forever ago, I still want them too. ;D

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: Features Wishlist
« Reply #1821 on: January 31, 2011, 10:10:27 pm »
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. ;D
As do I. I LOVE SWITCH STATEMENTS
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results:





Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #1822 on: January 31, 2011, 10:24:25 pm »
We've had this much support for them before, and he hasn't added them.  Let's hope this time, the tide's changed! ^-^

SirCmpwn

  • Guest
Re: Features Wishlist
« Reply #1823 on: January 31, 2011, 10:27:18 pm »
We've had this much support for them before, and he hasn't added them.  Let's hope this time, the tide's changed! ^-^
*tiDE ;)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Features Wishlist
« Reply #1824 on: January 31, 2011, 11:04:21 pm »
We've had this much support for them before, and he hasn't added them.  Let's hope this time, the tide's changed! ^-^
*tiDE ;)

XD

And a last-minute major request: Trinary operators! :D It would work great in Axe since it relies so heavily on HL. Not sure if it's too late to suggest something so big, though.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #1825 on: February 01, 2011, 12:25:56 am »
I would indeed like switch statements. Sometimes it's just easier to write code that way when the program can do many different things depending of the result of a variable, for example. (such as selecting magic that uses different code for each in a game)

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Features Wishlist
« Reply #1826 on: February 01, 2011, 05:25:46 pm »
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 -1
Do stuff
Return
End
!If -1
Do stuff
Return
End
!If -1
Do stuff
Return
End
and 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.
« Last Edit: February 01, 2011, 05:28:40 pm by squidgetx »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Features Wishlist
« Reply #1827 on: February 01, 2011, 05:26:59 pm »
You have to use Else!If in that case. Otherwise you could run multiple loops, depending on the returned value.




Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Features Wishlist
« Reply #1828 on: February 01, 2011, 05:28:22 pm »
Not if you're returning or goto'ing somewhere else though :P

Edit for a completely unrelated subject: Can I bring up again a feature request for alternate steps for For() loops, the same way it is in BASIC?
« Last Edit: February 01, 2011, 07:06:59 pm by squidgetx »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #1829 on: February 02, 2011, 02:42:13 am »
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 -1
Do stuff
Return
End
!If -1
Do stuff
Return
End
!If -1
Do stuff
Return
End
and 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.
You mean if QUigibo implements switch statements the source would be easier to read than this but the executable would be less optimized?