 ________
|___  ___|
   |/|
   |/|
 __|/|___
|________|NSIGNIA Version 1.0

File Packing List:

DIAGNOST.83P
INSIGNIA.83P
ROMANNUM.83P
ZGRAFSET.83P
ZICONLIB.83P
ZISPREFS.83P
ZPASSWRD.83P
ZPRGLIST.83P
ZTXTTYPE.83P
ZWRDWRAP.83P

Table of Contents
  Insignia- Introduction
  Insignia- Nah thanks, I'll stick with Ion
  Insignia- Hey wait a minute, this program is really gay.  What the f*** is the   point of it?
  Insignia- User Manual
    Navigating
      Folder and File Mode
      The Command Prompt
    Preferences
      Password Function
      Message Recorder
      Quickload
      Sprites
    Adding New Programs
    The Diagnostic Utility
    Technical Information
  Insignia- What's coming up?
  Insignia- Bugs
  Insignia- ZEALOT ZSUBS (What are they?)


Introduction

Insignia is one of the few shells written in BASIC.  Insignia's goal is to allow TI users to sort and password protect their programs, while allowing programmers to learn some advanced BASIC programming techniques.  This will be covered in the next section.  Insignia is a GUI, which means that commands are executed  through a graphical interface rather than through a command-prompt.  Insignia also features a bunch of cute little sprites (mini-pix) reminiscent of windows style interfaces.


Nah thanks, I'll stick with Ion

Good idea!  If you have Ion on your calculator, keep it.  You'll need it for ASM programs.  However, Insignia's main goal is, rather than serve as a shell, to serve as a learning tool.  Anyone who has learned the basics (pardon the pun) of TI-BASIC should take a look at the code for Insignia and all its subroutines.  Insignia uses string operations, graphical output, and subroutine execution, all things that should be learned by any TI programmer.

Hey wait a minute, this program is really gay.  What the f*** is the point of it?

Like I said, Insignia is more of a learning tool than a functional program.  However, it does have a few handy features.


User Manual

Insignia is a very complex program, therefore TAKE TIME to read through this manual before integrating Insignia into your calculator.  Oh by the way, if you get a menu saying "Auto Powersave" while using Insignia, it means that Insignia has detected that it has been idle for too long, and has given power-saving mode control to the calculator.  What I mean by this is that while Insignia is running, the calculator cannot interrupt the program and go to Powersave mode.  Therefore, if you leave Insignia running and walk away, it could really suck and drain your batteries.  But it doesn't, because Insignia displays a menu if it has been idle for too long.  Cleverly, at any menu, the calculator is given powersave control, so if a calculator is left running at a menu for too long, it will go into power save mode.  This translates into Insignia going into powersave mode after 4 minutes or so of idleness.

   Navigating

     Folder and File Mode

Insignia uses a system of folders and files, similar to Windows Explorer for *shudder* Windows 95-00.  When you first start Insignia, it will be in folder mode.  To navigate between folders, simply use the up and down arrow keys.  To access the contents of a folder, use the right arrow key to open into file mode (the right section of the screen) and the left arrow key to go back into folder mode.  In file mode, use the up and down arrow keys to scroll, and the [2nd] key to execute the program.

     The Command prompt

Insignia combines a file-folder sorting system with a command-prompt features system.  Whenever the "command prompt" is referred to, it means the small bar at the bottom of the screen.  During normal execution, the prompt will simply say "FLABBERGHAST@TECHIE.COM", our email address.  However, the prompt will become active whenever a special feature is used.  While the prompt is active, you will not be able to use the file-folder system until you exit out of the prompt by either completing your action or pressing "MODE".
     
   Preferences

Insignia has a variety of user-set preferences that should be set up when Insignia is run for the first time.

       Password Function

         Change Password

The VERY FIRST TIME you run Insignia, Insignia will assign you the password "PASS".  You will only need this password when you want to set up your personal.  To set up a password, do the following the very first time you run Insignia.  While in Folder mode, press "Mode".  This will take you to the options prompt.  Press the button directly under "PREF" - that should be the "Window" button.  Scroll down to "Change password" and use the right or left arrow button to select.  You will then notice that a prompt appears in the bottom of the screen for "Current Password".  Use the keypad (do not press alpha, Insignia is set up to automatically take keystrokes as letters) and type in your current password (if this is first time setting up a password, type "PASS").  "Del" functions as a backspace key.  You will notice that as you type in the password, you only see the [] character printed.  This is similar to the way asterisks are printed when you type a password on a computer.  Press enter, and if the password you entered is correct, a prompt will appear for the new password.  Type in your new password (to a maximum of seven letters) and press return again.  Press "MODE" to return out of the Preferences option, and "MODE" again to return out of the Options Menu.

         Lock / Unlock Program Execution

Setting a password doesn't do much good if you cannot implement it.  To 'lock' your programs, simply press "MODE", and select "Y=" (the button under LOCK).  Voila, Insignia is locked, and the little lock icon closes.  To unlock, simply select the LOCK option again, except this time you will be prompted for your password before password protection is removed.  When Insignia is locked, you will  be prompted for a password before every time you run an application.

       Message Recorder

This is basically a scrolling marquee of whatever you want.  It will scroll across the command prompt whenever you use MODE -> READ (Trace button).  To enter a new message, choose "WRITE" from the MODE menu, and key in a message.  Press return to return to the MODE menu, and of course MODE will always take you out of the MODE menu.  Any time you want to view your recorded message, simply choose the "READ" option.  Incidentally, choosing "Zoom" will display a short blurb about Insignia in the marquee fashion - but don't worry!  It won't overwrite your recorded message.

       Quickload

When Insignia is first run, it has to load all the graphics that you see onto the screen, and as you may notice, it takes time.  In order to avoid having to deal with reloading the screen after every time you run an application, Quickloading saves your screen as a Pic file and your variables in a list before application execution.  Then, after program execution, it reloads the variables from the list and the screen from the Pic file.  In general, you want this feature turned on.  However, there may be some purposes for which you will want to be able to turn this off.  Simply go to "Quickload" in the PREFS section, and use the left and right arrow keys to toggle Quickload on or off.

       Sprites

Like the initial screen, the icons you see on the screen have to be reloaded every time they are modified.  To increase speed, you can choose to have sprites replaced by text characters, which make loading go faster but look terrible on the screen.  It is highly recommended that you leave sprites on; you need ZICONLIB anyway, and the loading time isn't that bad.  If you really want to turn sprites off, though, the option is found under the PREFS menu, and the right and left arrow keys will toggle sprites on and off.

   Adding Programs

The really sucky thing is that Insignia has no way of recognizing your programs. I set up Insignia to initially work with my roman numeral converter (Converts Arabic numbers to Roman Numerals), but you are going to want to make it work with other programs.  Consequently, if you want a program to be executable through Insignia, you must add a few lines of code (don't worry, nothing complicated).  Go into edit mode for the file ZPRGLIST and go down to the line that reads "If A=[n]", where [n] is the category you want to list the program under:
n	Category

1	games
2	math
3	science
4	utilities
5	other

Then, in the block of code following the particular If statement, increment the value of K by changing the value of [n] in "[n]->K" to one greater.  For example, change "2->K" to "3->K".  Then, you may see some lines of code that say "Text (row, column, "Str")".  After the last, if any, text statement in that block, type in the following code:

Text ([row], 36, "[Title]")

where [Title] is the title you want for your program, and [row] can be calculated by multiplying (K-1) by 7.  For example, if your new value for K is 3, row would be 7(3-1) = 14.

Almost done!
Scroll down past the calls of ZICONLIB, past all that other junk until you start seeing lines that call programs such as ROMANNUM.  There, you will see lines that read something like "If A=[n] and B=[m]".  Insert the following two lines directly above that line of code:

"If A=[n] and B=[m]"
"prgm[program name]"

where [n] is the category of your program, [m] is the number of your program in that category (if its the third program in math, you would make n=2 and m=3).  [program name] is simply the file name of the program you want to execute.
Yay!  Exit the editor, and the program should show up in the programs list when you run Insignia.  If you want to remove a program, simply delete/unedit the code indicated in the "adding programs" section.

   The Diagnostic Utility

Insignia is really complicated.  And gets screwed up easily.  If you ever encounter a  problem that you cannot solve, you can try running the diagnostic.  It is designed to detect common errors such as Insignia 'crashes', missing subroutines.  It also clears out unimportant variables such as y= functions and the variables.

   The Technical Stuff

Insignia uses the following permanent variables, so DON'T CHANGE THEM unless you want to reset their function:

LSHELL
LARG
Str7
Str9

LSHELL is the list that stores all of Insignia's operational parameters, with each element having the following purpose:

LSHELL element		function
	1		Lock Toggle (1=locked, 0= unlocked)
	2		Setup Status (1=Insignia has been run, 0=it hasn't)
	3		external variable 'A'
	4		external variable 'B'
	5		external variable 'K'
	6		Run Flag (1= program has permission to run)
	7		Speed (1=fast, 0=slow)
	8		Quickload Flag (1=off, 0=on)
	9		ZICONLIB sprites Flag (1=off, 0=on)
	10		Break Intercept Flag (1=break intercepted, 0=normal exit)
	11		Missing Subroutines Flag (1=subroutines are missing, 0=normal)

LARG is the list passed to the ZSUBS; its elements have the following effects:

LARG element		function
	1		Icon number for ZICONLIB
	2		graph row for ZICONLIB sprites
	3		graph column for ZICONLIB sprites
	4		Alternate representation of the icon (eg, filled or hollow)
	5		Run Flag (1=subroutine has permission to run)

Whats coming up?

Well, the Insignia project is pretty much done, although I am thinking about releasing a compendium that goes through some of the techniques used in this program and explains them in more depth than this manual.  I may also eventually recreate Insignia in asm, making it more of an OS and less of a piece of crap.  But, in the mean time, enjoy!

Bugs

Insignia itself doesn't have any bugs that I know of, but those subroutines are quite picky.  For example, pressing an invalid character at a text input prompt has been known to cause problems, and words are not wrapped either (you will just type off the screen if you keep typing).  If you find any blatant bugs, tell me about them, please.

ZEALOT ZSUBS

As you may have noticed, Insignia requires quite a few subroutines, and they all begin with a 'Z'.  Yes, we know thats the standard for assembly programs, but we want to make our subroutines unobtrusive by sticking them all at the bottom of the program list.  The ZEALOT ZSUBS are subroutines that function much the same way that functions in C or C++ do.  The only difference here is that the parameters are supplied as a list, and the return value is usually "void".  More information and a complete package of the ZEALOT ZSUBS will be released soon, for the perusal of the BASIC programming community.