Author Topic: Axe language for the TI-Nspire and 68K calcs?  (Read 10417 times)

0 Members and 1 Guest are viewing this topic.

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
Axe language for the TI-Nspire and 68K calcs?
« on: February 28, 2010, 12:06:04 am »
With the release of the Nspire exploit, I thought in the future it would be cool if somebody written a new programming language for the TI-Nspire where the syntax is exactly the same as Axe. Of course it wouldn't be editable in the TI-BASIC editor of the Nspire, the concept would be the same as other languages. An editor/converter would be made for the PC or the calculator, and it would convert the code to ARM assembly format. It would probably have to be done by somebody else who knows ARM ASM but I thought it could be an idea since not only it would provide an alternative to TI-Nspire BASIC, ASM and C, but it would be even easier to program (and learn) than the TI-Nspire native BASIC language.

Another thing that could be done is something similar to Axe where you type programs similar to TI-BASIC in the program editor built-in the calc, but the syntax would completly change, as for example, the TI-Nspire has no Input, Output nor Text commands. Different random unrelated commands would have to be found, altough since Nspire programs aren't token-based on editing, people could just write Output( anyway then the Nspire Axe parser would interpret them fine.

Such project would probably need to be started only when it is certain Axe parser syntax will not change anymore, though.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #1 on: February 28, 2010, 12:17:23 am »
With the release of the Nspire exploit, I thought in the future it would be cool if somebody written a new programming language for the TI-Nspire where the syntax is exactly the same as Axe. Of course it wouldn't be editable in the TI-BASIC editor of the Nspire, the concept would be the same as other languages. An editor/converter would be made for the PC or the calculator, and it would convert the code to ARM assembly format. It would probably have to be done by somebody else who knows ARM ASM but I thought it could be an idea since not only it would provide an alternative to TI-Nspire BASIC, ASM and C, but it would be even easier to program (and learn) than the TI-Nspire native BASIC language.

Another thing that could be done is something similar to Axe where you type programs similar to TI-BASIC in the program editor built-in the calc, but the syntax would completly change, as for example, the TI-Nspire has no Input, Output nor Text commands. Different random unrelated commands would have to be found, altough since Nspire programs aren't token-based on editing, people could just write Output( anyway then the Nspire Axe parser would interpret them fine.

Such project would probably need to be started only when it is certain Axe parser syntax will not change anymore, though.
Would it have to be compatible with the z80 version though? I mean, it would probably be preferable to take advantage of the extra screen space/colors and the 32-bit processor.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: Axe language for the TI-Nspire and 68K calcs?
« Reply #2 on: February 28, 2010, 12:24:58 am »
it could be different, not necessarly compatible. It could simply be similar to the point where all you have to do is copy your code from SourceCoder to notepad or the Axe Nspire editor then all you need to do is change code to use all the screen.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #3 on: February 28, 2010, 01:35:32 am »
That would be pretty cool!  But Axe syntax is really designed around the limitations of the tokens available to Basic programmers as well as z80 itself.  If the Nspire is not token based and uses ARM assembly, it would be easier just to create a C language or something well defined since its more universal and there would be more support for it.  You would have to start from scratch either way since this isn't something that would be "portable" since it is so heavily dependent on z80 and token parsing.

I might get an Nspire myself after its finally cracked, but until then, I'm just going to stick with z80.
___Axe_Parser___
Today the calculator, tomorrow the world!

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: Axe language for the TI-Nspire and 68K calcs?
« Reply #4 on: February 28, 2010, 01:44:12 am »
well C is alerady possible, but C is much harder than TI-BASIC. I suggested a Axe-like syntax, since it would be easier for people who hate complex languages and like the simplicity of TI-BASIC and Axe. Maybe you don't find C hard, but I myself do. I tried learning it before and gave up.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #5 on: February 28, 2010, 02:00:25 am »
It is possible to have a language with C syntax, but still Basic style.  The biggest reason I found C difficult when I first learned it was due to all the external calls you have to make.  Like printf() had a bizarre way of displaying stuff and if you want to draw a picture to the screen, you have to import tons of libraries and use all these weird functions to communicate with different drivers, do all this initialization stuff, and it was just so frustrating!

All you have to do to make C easier is just have a built in library that supports all the essential functions like DrawXor(X,Y,Sprite) for instance.  If a sufficient built in library is created, then it becomes extremely easy to program regardless of the actual syntax.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #6 on: April 13, 2010, 04:32:55 pm »
I don't think you realize that toughs libraries that you have to import can't be made part of the language because c interfaces to the processor not the OS so OS calls become library calls

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #7 on: April 13, 2010, 08:20:00 pm »
I think what Quigibo means is that we can have a single header file with wrappers for the commonly used functions (so for example, double buffering would be as simple as pixelOn(x,y) followed by a refresh()).

Offline tensuke

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
  • Crab Nicholson
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #8 on: April 13, 2010, 08:46:03 pm »
A custom language that translates to ARM assembly would be really nice because it would open up a whole lot of developers that don't have the time to/can't learn C or asm. It would be a huge undertaking though given the Nspire's more advanced capabilities/architecture.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #9 on: April 13, 2010, 08:51:43 pm »
I think what would be more feasible would be a Basic-like language that "compiles" into C.
I think C is already fairly easy to code in, though, other than a couple of annoying things (lots of headers and arrays that don't know how long they are come to mind).

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: Axe language for the TI-Nspire and 68K calcs?
« Reply #10 on: April 13, 2010, 09:11:54 pm »
well I personally found C to be rather hard when I tried it on 68k calcs. I would rather have an easier language like TI-BASIC. Axe could do.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #11 on: April 13, 2010, 10:51:40 pm »
Don't the 68Ks already have NewProg? It's basically the same thing as AXE, isn't it?

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: Axe language for the TI-Nspire and 68K calcs?
« Reply #12 on: April 13, 2010, 11:18:28 pm »
Yeah it came out after I started this thread, quite ironically. Idk if it's like Axe, though. I heard it was like 68k BASIC meaning the syntax is slightly harder than some Axe commands but easier than others.

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: Axe language for the TI-Nspire and 68K calcs?
« Reply #13 on: April 24, 2010, 11:52:21 am »
why not make a header file called something like "z80 lib common.h" and do this
Code: [Select]
#ifndef Z80_LIB_COMMON_H
#define Z80_LIB_COMMON_H
//all the libraries you normally need

//functions to do common tasks with inline directive on each.

#endif

and your done write it once and it works every time no needless complexity.
At the beginning of every file put #include "z80 lib common.h" and your done it all works.
I'm honestly surprised it doesn't already exist.
and you don't have to worry too much about making really efficient code cause any decent optimizing compiler will rewrite your code in to something more efficient then you could ever possibly come up with anyway so all that matters is the algorithm you use for the most part.

someone make it weeks project I would do it but I don't have the time with other stuff.  :)
« Last Edit: April 24, 2010, 12:00:10 pm by theUnnamed »

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: Axe language for the TI-Nspire and 68K calcs?
« Reply #14 on: April 24, 2010, 11:59:43 am »
I am confused, would this be used to write some sort of macros, instructions that looks like Axe Parser, for example, becoming some sort of new language, but in the end it converts back to ASM?

Also there's still the issue of on-calc programmability. This is what is nice about TI-BASIC, Axe Parser, BBC Basic, MLC on the TI-86/AFX and 68k languages like NewProg, GFA BASIC (french) and its 68k TI-BASIC: you can program them directly on calc, meaning when in the school bus or between classes, you can still code fine. It would be nice to have a Nspire language like Axe for example that was programmable directly on the Nspire, then running a program that compiles it into ARM assembly.
« Last Edit: April 24, 2010, 12:03:26 pm by DJ Omnimaga »