BShell [BSHELL] is a shell for the 83+/84+ series calculators.
Written in Hybrid BASIC, it utilizes the BASIC libraries provided by DCS7.2 to create an intuitive user experience.


There are two main portions of the program: Setup and Display.
Setup generates a list of all program names, and stores program attributes (icons, archived status, size, etc) in custom lists and AppVars.
Display reads those lists and AppVars to display an interactive menu of programs, allowing the user to run and edit programs as they see fit.
When a program is selected with [2nd]/[ENTER], the program is run.
If the program exits without error, the user will be returned to the Display menu to select/edit/run another program.
[CLEAR] exits the program from the Display menu.


Features include:

Display 3-row list of programs, scroll with up/down, and jump 3 rows with left/right
Running BASIC and ASM programs directly from ROM or RAM ([TRACE] key)
Toggling Archive status and Lock tag ([WINDOW] and [ZOOM] keys)
Displaying DCS (8x8 scaled to 16x16), DCS6, and Hybrid MirageOS/DCS Icons
Icon and program name data stored in custom AppVar
Displaying ION ASM programs among the list (but without being able to run them)


Future improvements to be made:

Running ION ASM programs
Listing AppVars and Hidden programs in a separate "menu"
Improve the Display scrolling speed
Decrease Setup time
Rename and Copy programs
Delete and Create programs
This looks cool and quite promising! I'm impressed how fast the progress has been on it so far. You should use Celtic CE to port it to the CE Wink
Porting to the CE will have to come at a later date, I really want to optimize these routines first, especially for the slower hardware of the 83+

I have added a simple check at the top of the program that checks if the output of det(9 is the same as it was when last ran. If it is, then it assumes that setup is not out of date enough to run again, and skips directly to displaying the list. There is a risk that outdated Icon data is displayed, but that is okay, since the icons are not updated while the shell is running.



Testing some more, it is apparent that the det(9 trick it too sensitive, while also throwing false negatives. I will need to find another way to detect when skipping setup is possible.
BShell Version 1 is complete!



Finding the programs has been separated from the collection and generation of program data, such that the data generation step (which is most timely), can be skipped if the list of program names is the same as the previous run. This drastically reduces the launch time after an initial launch.

There are many features that I wish to implement in a future version, but this Version 1 serves as a minimum viable product. I will be uploading BShell to the archives soon.



There are a few problems that need to be solved for a Version 2:

1) Generating an alphabetized list of programs.
Currently, I am calling det(32,"A"), det(32,"B"), det(32,"C")... in a For loop that increments the searching character, but it is not the fastest thing, and doesn't find AppVars or hidden programs. On the other hand det(9) returns a everything, but also includes system-reserved programs and isn't in alphabetical order.
Basically, I just want the same list of programs as you see them when you hit the PRGM button. What is the simplest/fastest way to achieve that?

2) Scaling an 8x8 sprite to 16x16 time-efficiently.
Currently, this is the most time-consuming portion of the data generation section. Here is the current code snippet:
Code:
[8x8 icon data]->Str6
" ->Str9
For(I,1,16
   Ans+sub("0000030C0F30333C3FC0C3CCCFF0F3FCFF",1+2*inString("0123456789ABCDEF",sub(Str6,I,1)),2
   If length(Ans)>4
   Then
      Str9+sub(Ans,2,4)+sub(Ans,2,4->Str9
      "
   End
End
This results in a Str9 containing hex data for a 16x16 icon that represents the original 8x8 scaled by 2x.
Is there a better/faster way to achieve this same goal?

3) Running ION programs
Currently, ASM programs are detected (and run using 'Asm(prgmNAME)' ) when either AsmProg is the first token, or if the first 2 bytes are 0xBB6D. If the first 2 bytes are 0xBB6D and the third byte is 0xC9, then the program is assumed to be an ION file. The 0xC9 in ION files exits the program immediately when run with Asm(. I do not have ION installed on my calculators, yet DoorsCS 7.2 can launch ION files and they run perfectly.
What do I need to do to support running ION files natively from (Hybrid) BASIC?

I look forward to your ideas and feedback for implementing these improvements.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement