* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: TI-Basic DIY Library  (Read 1217 times)

0 Members and 1 Guest are viewing this topic.

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
TI-Basic DIY Library
« on: January 16, 2017, 12:29:41 am »
I'm going to rework the code I had for the "TI-Basic Library" into a DIY-Library maker! Got some code that repeats over-and-over, and you want to save space? Easy! You can create your own customly-named AppVar, holding all the information, from the name of the function, to the subroutines they execute!
Unfortunately, there are some drawbacks so far:
*Can only handle one input after the (. You can technically have more than one input, you just have to make sure it isn't destroyed by any variable used by prgmDIYLIB
*Can only handle number inputs
*Only technically works on the CSE. It would be pretty easy to port to monochrome calcs (and possibly the CE), so if you're interested, contact me!
*Running it is most likely slower than just typing out the equation normally

(note: This is not a serious project. I finished this in like 4 hours and felt like it was cool to mess around with)


(click to show/hide)

If you downloaded the previous version, please redownload. The previous version could only handle 2 commands, where as this one has been fixed to handle as many as possible.
« Last Edit: January 16, 2017, 10:55:49 pm by 123outerme »


  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 215
  • Post Rating Ratio: +9/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
    • View Profile
Re: TI-Basic Library
« Reply #1 on: January 16, 2017, 12:37:55 am »
can you just type in the command?
If so, that sounds really cool!  Post some more details on how it works?  ;)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic Library
« Reply #2 on: January 16, 2017, 12:46:09 am »
can you just type in the command?
If so, that sounds really cool!  Post some more details on how it works?  ;)
Unfortunately, no. You have to type something like:
Code: [Select]
:"DIGIT(100
:prgmLIBRARY
// bytes: 19
Just for reference, the code it runs takes up only 15 bytes (including protecting against nonreal numbers or a mix of real/nonreal), plus the 102-byte interpreter, means that this is for right now, really inefficient. I assume that if I use this to create subroutines (which actually sounds better than using this as a library), there would actually be space to gain from this.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 215
  • Post Rating Ratio: +9/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
    • View Profile
Re: TI-Basic Library
« Reply #3 on: January 16, 2017, 12:49:16 am »
Will you make it so the user can make their own?

I can't tell, is it written in basic or assembly? Appvars suggest assembly, but it is called like basic. (no Asm() command)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic Library
« Reply #4 on: January 16, 2017, 12:51:18 am »
Will you make it so the user can make their own?

I can't tell, is it written in basic or assembly? Appvars suggest assembly, but it is called like basic. (no Asm() command)
Users can make their own if they open the AppVar (on a computer, of course), but there's no way to make one on-calc as of yet. That might actually be something interesting to consider.
It's a Hybrid-BASIC program, accessing the pre-created AppVar using Celtic II CSE.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 215
  • Post Rating Ratio: +9/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
    • View Profile
Re: TI-Basic Library
« Reply #5 on: January 16, 2017, 12:56:38 am »
It would definitely be more useful if you added the ability to create the appvars on the calc.
It would be really useful then, and could even be used for making really large games or games that share large chunks of the same code.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic Library
« Reply #6 on: January 16, 2017, 01:02:00 am »
It would definitely be more useful if you added the ability to create the appvars on the calc.
It would be really useful then, and could even be used for making really large games or games that share large chunks of the same code.
Yeah, I think so too. I'll probably make an on-calc editor that has the names of the functions listed. When you select one, you'll be able to edit its name and the function it performs.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 215
  • Post Rating Ratio: +9/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
    • View Profile
Re: TI-Basic Library
« Reply #7 on: January 16, 2017, 01:08:40 am »
A port to the b/w calcs would be nice when you have finished the color version. With a little work, you could make something really great from this!
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic Library
« Reply #8 on: January 16, 2017, 02:12:18 am »
A port to the b/w calcs would be nice when you have finished the color version. With a little work, you could make something really great from this!
That actually wouldn't take long at all, I just have to know; is Doors a staple in the community for monochrome calcs, as it is for the CSE? Or will I have to (get someone to) do it in Axe?
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic DIY Library
« Reply #9 on: January 16, 2017, 05:06:16 am »
Update: Screenshot! Also download if anyone wants it. This download is for the TI-84+CSE only, requiring Doors CSE. It is fairly easy to port, so if you're interested in porting it to monochrome calcs/the CE, contact me!
« Last Edit: January 16, 2017, 05:37:55 am by 123outerme »
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Online DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18190
  • Post Rating Ratio: +91/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: TI-Basic DIY Library
« Reply #10 on: January 16, 2017, 05:27:35 am »
I'M not too sure if I really understand the concept, no matter how much I try to read, but is it kinda like some sort of programming language maker?
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic DIY Library
« Reply #11 on: January 16, 2017, 05:34:04 am »
I'M not too sure if I really understand the concept, no matter how much I try to read, but is it kinda like some sort of programming language maker?
In a way, yes! It's more like doing this in ASM (lifted straight from Learn Asm in 28 Days):
Code: [Select]
#define    move(src, dest)    LD dest, src
except it doesn't handle more than one input inside the parentheses at a time (though by customizing the algorithm you can still make it process more than one input, since it uses expr() to function)
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Online DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18190
  • Post Rating Ratio: +91/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: TI-Basic DIY Library
« Reply #12 on: January 16, 2017, 05:46:58 am »
Ah ok. I remember in 2006 when someone made a new programming language in pure BASIC. It was supposedly slower but up to 3 times smaller O.O

http://www.omnimaga.org/ti-z80-calculator-projects/stupidlydidledtupidlydidledidledidly/
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2197
  • Post Rating Ratio: +8/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
    • View Profile
  • Gender: Male
Re: TI-Basic DIY Library
« Reply #13 on: January 16, 2017, 11:48:13 am »
so this thing lets you write some code that will then be packed into a userdefined command and executed even faster than regular code?
Well that's really nice! O.O
But how far is it possible to include those commands into a project?
Forexample if you have 2 games using this, but each using commands with similar names but different mechanics, will that even be possible?
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 583
  • Post Rating Ratio: +2/-0
  • Professional Unpaid Intern
    • 113/11355
    • View Profile
  • Gender: Male
Re: TI-Basic DIY Library
« Reply #14 on: January 16, 2017, 02:22:23 pm »
so this thing lets you write some code that will then be packed into a userdefined command and executed even faster than regular code?
Well that's really nice! O.O
But how far is it possible to include those commands into a project?
Forexample if you have 2 games using this, but each using commands with similar names but different mechanics, will that even be possible?
It's actually a bit slower than regular code, since it needs to interpret the command you're sending and still execute the code.
The answer to your other question is pretty simple: On creating an AppVar, you define its name. Just change a name that won't be called by any other game. Then, when you go to run the commands, make sure the name of your AppVar (prefixed by "rowSwap(" ) is in Str0. It will search through ONLY your AppVar to find the command.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games