Shell Making By: Patrick Stone This is a tutorial on how to make a Shell in TI-83+ BASIC programming. For all of those new to programming, I will try to make this as easy to understand as possible. First, you need to know that it is impossible to find the program names without using an ASM(Assembly) program or two(unless you make the user input the information, but this is impractical). To do this, I recommend Ptools version 1.2. (http://www.ticalc.org/archives/files/fileinfo/209/20900.html). It includes a program that can tell you what the program names are on the calculator (ZLIST), a program to lock, unlock, archive, unarchive, and delete programs(PTOOLS), and a program to run other programs(ZRUN). Secondly, you should be at least a bit familiar with BASIC programming, but if you aren’t, be prepared to learn. Lastly, this can be very time consuming. But not to worry, it is all worth it in the long run. Tutorial 1 Learning the Basics of Shells Any shell must be able to display program names in some list or screen. Also, you want the user to want to continue using your shell. So it makes sense to try to compact the most amount of options and features as possible without taking up too much memory. After all, the shell is supposed to run the other programs. If there is not enough memory, it will not be able to. First, you should figure out what you want to include in the shell. For instance, Black Eagle Shell(a BASIC shell I made) includes showing the program names, hibernating, ASM compiling, a screen saver, info about the shell, support for external GUIs in RAM, showing the amount of free RAM, Enabling/Disabling Lowercase Text, Toggling the Run Indicator, and inversing text. Also, it has the ability to tell the user whether or not the current program is archived or locked. After you figure out what you want your shell to include, you must find(or make) programs to do what you want it to do. (Black Eagle Shell uses ASM programs for lowercase, run indicator, free RAM, and text inversing). Tutorial 2 GUI Drawing or Homescreen Setup Next, you must decide if you want your shell to feature a Graphical User Interface(GUI) or just a homescreen display. GUIs use the Graph to draw and display things and allow for graphics. The homescreen display is simple and small in program size. If you want to have a GUI, you should draw it on the graph screen. Make sure you make it as appealing as possible. I suggest maybe stating which keys do what. (For example, Black Eagle Shell, on the right side of the GUI, states which keys toggle each option. Black Eagle Shell v 1.0 ( )). Either save this as a Pic or use Screen Shot Maker to make the file into an ASM program. (http://www.ticalc.org/archives/files/fileinfo/171/17119.html) For the homescreen setup, you should figure out where you want the program name and any options to be displayed. Tutorial 3 Simple BASIC Shell Here is a simple BASIC shell using the homescreen setup. :ClrHome (Clears the Homescreen) :" "->Str0 (Puts a space in String 0 so ZLIST will start from the beginning) :1:Asm(prgmZLIST (One into ANS)(Runs ZLIST starting from beggining of alphabet) Note: ZLIST puts the program name into Str0. If you put 0 into ANS, it is in ascending order, 1 into ANS, descending order. :Lbl 0 (Label Zero, marks something we can "jump" to later) :Output(1,1," " (Displays 8 spaces, to clear this line, on the first line) :Output(1,1,Str0 (Displays the program name on the first line) :0->K (Makes K=0) :While K=0 (Until K no longer equals zero, keep doing the next lines) :getkey->K (Loads K with the key number when one is pressed) :End (Tells the "While" to repeat until K doesn't equal zero) BEGINNING OF KEY CHECK SERIES :If K=34 (If Down is pressed, do the next thing) :goto 1 ("Jumps" to Label One) :If K=25 (If Up is pressed, do the next thing) :goto 2 ("Jumps" to Label Two) :If K=105 (If Enter is pressed, do the next thing) :Asm(prgmZRUN (Runs the program in Str0, whether it is archived or not) Note: Since no "goto" is used here, the command "Asm(prgmZRUN" will be executed and then the last command in the series will be executed ["goto 0" in this case]) :If K=45 (If Clear is pressed, do the next thing) :goto 3 ("Jumps" to Label Three) :goto 0 (If none of the above keys are pressed, jump to label zero) END OF KEY CHECK SERIES :Lbl 1 (Label One, down was pressed) :1:Asm(prgmZLIST (One into ANS)(Runs ZLIST, next program into Str0) :goto 0 ("Jumps" to Label Zero to display the Program name in Str0) :Lbl 2 (Label Two, up was pressed) :0:Asm(prgmZLIST (Zero into ANS)(Runs ZLIST, last program into Str0) :goto 0 ("Jumps" to Label Zero to display the Program name in Str0) :Lbl 3 (Label Three, Clear was pressed) :ClrHome (Clears the Homescreen) :DelVar Str0 (Deletes String Zero) :DelVar K (Deletes K) I wrote this program in about 5 minutes. Of course, it is very simple and does not allow the user to do anything except view or run programs. However, to include archiving, unarchiving, locking, unlocking, or deleting programs, all that would be need is more If statements in the Key Check Series. Keep in mind, this would not check for program compatibility. MirageOS and ION programs are not supported unless they can be run from the homescreen. Tutorial 4 Graphical BASIC Shell Graphical Shells can be much more complicated, especially when tons of features are included. However, it doesn’t have to be. By slightly modifying our last program, we can have a simple, yet graphical, shell. :ClrHome (Clears the Homescreen) :ClrDraw (Clears the Graphscreen) :" "->Str0 (Puts a space in String Zero so ZLIST will start from the beginning) :1:Asm(prgmZLIST (One into ANS)(Runs ZLIST starting from beggining of alphabet) Note: ZLIST puts the program name into Str0. If you put 0 into ANS, it is in ascending order, 1 into ANS, descending order. :Lbl 0 (Label Zero, marks something we can "jump" to later) ***** (Check the note below) :Text(1,1,"(32spaces)"(Clears the line the program name will be on) :Text(1,1,Str0 (Displays the program name at 1,1 on the graph) :0->K (Makes K=0) :While K=0 (Until K no longer equals zero, keep doing the next lines) :getkey->K (Loads K with the key number when one is pressed) :End (Tells the "While" to repeat until K doesn't equal zero) BEGINNING OF KEY CHECK SERIES :If K=34 (If Down is pressed, do the next thing) :goto 1 ("Jumps" to Label One) :If K=25 (If Up is pressed, do the next thing) :goto 2 ("Jumps" to Label Two) :If K=105 (If Enter is pressed, do the next thing) :Asm(prgmZRUN (Runs the program in Str0, whether it is archived or not) Note: Since no "goto" is used here, the command "Asm(prgmZRUN" will be executed and then the last command in the series will be executed ["goto 0" in this case]) :If K=45 (If Clear is pressed, do the next thing) :goto 3 ("Jumps" to Label Three) :goto 0 (If none of the above keys are pressed, jump to label zero) END OF KEY CHECK SERIES :Lbl 1 (Label One, down was pressed) :1:Asm(prgmZLIST (One into ANS)(Runs ZLIST, next program into Str0) :goto 0 ("Jumps" to Label Zero to display the Program name in Str0) :Lbl 2 (Label Two, up was pressed) :0:Asm(prgmZLIST (Zero into ANS)(Runs ZLIST, last program into Str0) :goto 0 ("Jumps" to Label Zero to display the Program name in Str0) :Lbl 3 (Label Three, Clear was pressed) :ClrHome (Clears the Homescreen) :DelVar Str0 (Deletes String Zero) :DelVar K (Deletes K) ***** To show the GUI, you must put one of these: If you used a pic: :ClrDraw (Clears the Graphscreen) :RecallPic X (Where X is the Pic number you used) If you used as ASM program from Screen Shot Maker: :Asm(prgmNAME (Where NAME is the program name) Note: If the ASM prgm works but only flashes, you should use this: :Pt-On(X,Y (Where X,Y are coordinates in the screen, such as 0,0) :Asm(prgmNAME (Where NAME is the program name) Tutorial 5 Complex BASIC Shells Complex BASIC shells are not only possible, but exist today. Black Eagle Shell is a complex BASIC shell. Download it and check out the grouped programs to see how it works. Adding options screens are a good idea and the more the functions possible, the better. However, you do not want to waste too much memory. Try adding If statements in the Key Check Series to allow for the user to archive, unarchive, lock, unlock, or delete programs. For example, adding these between “goto 3” and “goto 0” near the end of the key check series would allow the user to press Y=(F1) to archive, WINDOW(F2) to unarchive, TRACE(F4) to Unlock, GRAPH(F5) to Lock, and DEL to delete. :If K=11 (If Y= is pressed, do the next thing) :2 (2 into ANS)(Then goes to end of Key Check Series) :If K=12 :1 :If K=14 :4 :If K=15 :3 :If K=23 :5 :Asm(prgmPTOOLS If you have any suggestions, comments, questions, or ideas on future tutorials, please let me know. SuiPsySof@yahoo.com or Defenestrator85@aol.com . You should include TI-83+ in the title so that I know it is not SPAM. Thank you. For Suicidal Psycho Software information and programs, please visit: http://www.geocities.com/suipsysof/