Author Topic: Pure Ti-Basic command line thingy  (Read 2218 times)

0 Members and 1 Guest are viewing this topic.

Offline LemonDrop

  • LV2 Member (Next: 40)
  • **
  • Posts: 26
  • Rating: +4/-0
    • View Profile
    • tin.gy
Pure Ti-Basic command line thingy
« on: July 09, 2013, 05:41:51 pm »
So recently I have been working on this pretty big project of mine and thought I'd just post it here because a lot of projects end up here eventually.
What makes it different is that most shells I see use lots of libraries/assembly programs to make the filesystem or string parsing easier, but to me I feel like that would be cheating in a way, which is why I am doing it purely in ti-basic. It also will be only one file (other than a 20 byte assembly program to enable lowercase text) instead of being split into a ton of peices and cluttering up the calculator.
So far only a few commands work (cd,dc,who,evl, and ext) but there will be more later.
Current stuffs:


-General Infos-
Filesystem:
Tape-style filesystem (file header, then content all in one big string)
-File Headers: 16 Tokens
-Dir Headers: 13 Tokens
Max 99 Files/99 Dirs/10 Users
999 tokens per file, 99 tokens for file/dir names

Filesystem Layout:
dev - Top dir, equivalent of C:\ in windows or / in linux.
dev/bin - System data (user file, environment vars, os config)
dev/usr - User folders go here on account creation, general storage
dev/msc - Programs go here (installed or otherwise)

Var Usage:
Str0 - HDD
Str1 - RAM
Str2 - Network Transfer
Str3 - Input Buffer
Str4 - Parsed Command
Str5 - Parsed Argument
I,J - General Looping
X,Y,Z - Optimization Vars

Current Commands:
cd - Change dir, operates like cd on any other command line except it can't parse paths yet (local folders only and ..)
dc - Dir contents, equivalent of ls on linux or dir on windows. Returns the format: [File/Dir Name|File/Dir:Permission Value]
who - Current user, equivalent of whoami on linux. Gets current uID from ram, parses usr.sd file, displays the login name.
evl - Evaluate, just passes stuff through the expr() command.
ext - Exit, cleans up everything (except hard drive is persistence is enabled in the config, not yet tho) and exits.

Future Plans:
File/Dir moving/deleting/editing
User creation/deletion, password hashing
File permissions based on users
Really basic interpreted coding language
Network connecting/disconnecting on specified port
File sending/receiving calculator to calculator
Remote shell possibly
Compression/Decompression for files
Installers for extra commands or something

If anyone has any comments or suggestions feel free to post them.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Pure Ti-Basic command line thingy
« Reply #1 on: July 10, 2013, 11:09:12 am »
Excellent work so far, LemonDrop !

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Pure Ti-Basic command line thingy
« Reply #2 on: July 10, 2013, 11:13:22 am »
Look pretty good!
BTW, welcome to omni!
!peanuts

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!