Symbulator Element Writer Copyright 2002
by Samuel Stearley <sstear70@calvin.edu>

Homepage: http://www.calvin.edu/~sstear70/
_____________________________________________________________________




Intro:
___________________________________________________________________
What's that you hear?  Samuel wrote something in c?  Yup.  I choose
to do it in c for fast developement so that I could get back to other
projects of mine that are being coded in asm.

Also the 89 version will work on the 92+ and vice versa.





Purpose:
__________________________________________________________________
This is for those of you (like me) who have trouble remembering
the syntax for each type of element that the symbulator can handle,
OR even what the letter for that element is.





Layout:
__________________________________________________________________
At the top of screen you have a listing of possible elements.  It
does not list them all.  So to list the rest hit F2, to go back
hit F1.  To see the about page hit F3.

In the middle of the screen between two lines the syntax for the
element you are currently typing will be displayed.

And at the bottom there will be a text editor.  So type away.
Only put one element on each line of the text editor.  The syntax
for the element you are currently entering will be given above
between the two lines.

It does not give any syntax for any element until the first letter
is entered.





Inputs:
_____________________________________________________________________
It can be executed with an argument: if it is then that argument is
loaded into the text editor at the bottom.

Or it can be executed without an argument and a blank editing session
is started.





Output:
_____________________________________________________________________
When done hit the escape key.  The program will exit and it will
return a string as a result in the history, assuming it passes the
error checking.  It will automatically place the ';' character for you
at each new line of the text.

To output with no error checking press quit (2nd+esc)

Now use the excellent symbulator on that string.





Error Checking:
_____________________________________________________________________
There are two types of errors that it can give you:

a) If you ever enter an element name that begins with a character
that is not associated with any element type then you get an error
instantly.

b) Upon hitting escape it will do a much more thorough anylsis of the
element names.  It will first try to evaluate the element name- if
this fails then it prints an error message and the cursor jumps to
the line with the error.

This takes care of things like: c1 as a name of a capacitor because the
name c1 is resrved by the tios for the data editor.

Once evaluation is done it checks the type of the result.  The type
must be a multiple letter variable name.  If not then an error message
is display and the cursor jumps to the line with the error.  This
catches the following:

	Element names that are a single character.
	Element names that are system variables.
	Element names that are expressions.
	Element names that are variables with a stored value.

Some of these are useful, some aren't but it catches them anyway.

IMPORTANT:
	The tios rom routines that can be used to
	jump the cursor around seem to be buggy.
	It is therefore possible that when the cursor
	is jumped there will be a left over non blinking
	cursor somewhere else on the screen.

	I think I know how to reproduce this:  1) Start the
	program with no string.  2)Type something that will
	be invalid when escape is pressed like '/'.  3)At
	this point you can leave the cursor where it is or
	press enter several times or do whatever.  4)Press
	escape but time the pressing so that it is pressed
	while the cusor is visible.  The key to the bug is
	in the pressing.  Do a hard press and hold it.

NOTE:
	You can also exit by pressing 2nd + quit.  In this
	case the string is returned but no error checking
	is done of the element names.





Thanks:
_________________________________________________________________
The tigcc team for thier sdk, documentation, and hard work.

Roberto Perez-Franco for the symbulator:
 http://www.perez-franco.com/sq/





Future Plans:
__________________________________________________________________
Reduce size.
Whatever I might think of.
Maybe enable var-link and catalog.




Liscense:
__________________________________________________________________
-This is free ware and you may not charge for it.
-It is open source but still my copywrite.
-I am not responsible for anything that might occur
 from useage of this program.
-Do not distribute a modified version of this .zip archive without
 my permission.  Or distribute any of the files in this .zip
 separately, unless you are transfering the compiled binary from
 calc to calc.





History:
_______________________________________________________
Release 1:	First release

Release 2:	Added much more powerful element name checking
		Fixed a bug with the b element.

Release 3:	Decreased size some.

Release 4:	Removed the optomize rom calls definition which
		caused it to crash in new ams versions.  I am
		so sorry.

Release 5a: Should work on a v200.
		A tad bit smaller.

Release 5b:	Second attempt at getting it to work on a v200.

Release 5c: Third attempt at v200 compatability.