-------------------------------------------------------------------------
Developer information for ZBASLIB

Created by Nat Allan
nallan@hotkey.net.au
Version 1.0
-------------------------------------------------------------------------
-------------------------------------------------------------------------
 Important info
-------------------------------------------------------------------------

This libary is passed variables using the theta, X and Y variables.  The
libary returns information using the Z variable.

IMPORTANT:  	The theta, X, Y and Z variables MUST be existent for the
		libary to run, regardless of whether it needs them or
		not.

Sample code to call the credit function of this libary:

----------------
0->theta
"ZBASLIB
Send(9prgmZASMLOAD
----------------


Please check the sample included BASIC programs to learn and fully
understand the usage of this libary.

You should call the credit function of this libary somewhere in your
credits.

The theta variable is the one that determines the function the libary
will call.
The variables X and Y will differ in function depending on which function
you call
The value of Z may be used for input or output depending on the function
If these variables dont exist, 'Err: Undefined' will be called.
Therefore, you should always create them at the start of your program.
To 'create' a variable, just store a number to it.  A sample header to
your programs could look like this:

------------
0->X
0->Y
0->Z
0->theta
""->Str0
------------

This libary does not include error-checking, as that would increase file
size even more.  Keep all variables within their pre-defined ranges and
include the above header.

-------------------------------------------------------------------------
 Function list
-------------------------------------------------------------------------

--------
 1.  Credits
--------
INFO:
	Displays the name, current version and some credits for this
	libary.  Should be called in your program.

INPUT:  
	Theta	= 0

OUTPUT:	
	Libary Name and author information
	
NOTES:
	Should be included somewhere in your program.
	
--------
 2.  PrintChar
--------
INFO:
	Displays the characer equivelant of the value in Z at the location
	X,Y in homescreen font (Large letters)
	
INPUT:  
	Theta	= 1
	X	= Column	(0-15)
	Y	= Row		(0-7)
	Z	= Character Number
OUTPUT:	
	Character Z at X,Y in homescreen font
		
NOTES:
	DO NOT try and print a characer outside these ranges, or your calculator
	will crash.
	Outputs character in large text no matter what screen your at.
	
--------
 3.  vPrintChar
--------
INFO:
	Displays the characer equivelant of the value in Z at the location
	X,Y in graphscreen font (Small letters)
	
INPUT:  
	Theta	= 2
	Y	= Column	(0-92)
	X	= Row		(0-58)
	Z	= Character Number
OUTPUT:	
	Character Z at X,Y in graphscreen font
		
NOTES:
	Do not try and print a characer outside these ranges, or your calculator
	may crash.
	Outputs character in small text no matter what screen your at.
	

--------
 4.  PrintString
--------
INFO:
	Displays the string in Str0 at X,Y in homescreeen font (Large letters)
	
INPUT:  
	Theta	= 3
	Y	= Column	(0-15)
	X	= Row		(0-7)
	Str0	= String to display
OUTPUT:	
	String Str0 at X,Y in homescreen font
		
NOTES:
	Do not try and print a characer outside these ranges, or your calculator
	may crash.
	Outputs character in small text no matter what screen your at.

--------
 5.  InverseOn
--------
INFO:
	Sets the Text Inverse flag on
	
INPUT:  
	Theta	= 4

OUTPUT:	
	No output as such, all text printed from there on is inversed.
		
NOTES:
	You must turn off the Text Inverse flag before you finish the program,
	otherwise all text OUT of your program will be outputed inverse too!
	
--------
 6.  InverseOff
--------
INFO:
	Sets the Text Inverse flag off
	
INPUT:  
	Theta	= 5

OUTPUT:	
	No output as such, all text printed from there on is normal
		
NOTES:
	None
	
--------
 7.  DirectInput
--------
INFO:
	Returns which arrow key(s) are being pressed to Z.  Supports multiple
	directions (diagonals)
	
INPUT:  
	Theta	= 10

OUTPUT:	
	Z	= Number (1-8)
		
NOTES:
	Number outputed works clockwise from up.
	
	Up		= 1
	Up/Right	= 2
	Right		= 3
	Down/Right	= 4
	Down		= 5
	Down/Left	= 6
	Left		= 7
	Up/Left		= 8
	
--------
 8.  SoundRout
--------
INFO:
	Sends a sound to the linkport (Plays sound if speakers/earphones
				       attached)
	
INPUT:  
	Theta	= 11
	X	= Tone
	Y	= Duration

OUTPUT:	
	Sends a sound to the linkport (Plays sound if speakers/earphones
			       attached)
		
NOTES:
	Sound should become more common in games, as it doesnt hurt if the
	user dosnt have speakers/earphones attached.  This routine's
	quality is just as good as a PC speaker, and many old games used
	that quite successfully
	
--------
 9.  InvertScreen
--------
INFO:
	Inverts the screen
	
INPUT:  
	Theta	= 12

OUTPUT:	
	Inverts the screen
		
NOTES:
	None
	
--------
 10.  CalcOff
--------
INFO:
	Turns off the calcluator
	
INPUT:  
	Theta	= 13

OUTPUT:	
	None
		
NOTES:
	Calculator resumes your BASIC program when resumed.  Could 
	therefore be used for a BASIC password program

--------
 11.  RunIndOff
--------
INFO:
	Turns off the run indicator
	
INPUT:  
	Theta	= 14

OUTPUT:	
	None
		
NOTES:
	None	
	

--------
 12.  RunIndOn
--------
INFO:
	Turns on the run indicator
	
INPUT:  
	Theta	= 15

OUTPUT:	
	None
		
NOTES:
	None
	

--------
 13.  GetContrast
--------
INFO:
	Checks the current contrast and retursn the value to Z
	
INPUT:  
	Theta	= 16

OUTPUT:	
	Z	= Current contrast (0-39)
		
NOTES:
	Can be used in a contrast changer or a battery meter


--------
 14.  SetContrast
--------
INFO:
	Sets the contrast to the value in Z
	
INPUT:  
	Theta	= 17

OUTPUT:	
	Z	= Contrast to set to (0-39)
		
NOTES:
	Can be used in a contrast changer
	
--------
 15.  VerInfo
--------
INFO:
	Returns the ZBASLib version to Z
	
INPUT:  
	Theta	= 18

OUTPUT:	
	Z	= Version Info
		
NOTES:
	Can be used to determine what value of ZBASLib has been
	installed, handy if your program uses a function from
	the latest libary.  Just query the zBASLib on your
	programs startup, and if the value isnt higher than
	or eaqual to the version you need, tell the user
	and exit.
	
--------
 16.  Protect
--------
INFO:
	Protects a program
	
INPUT:  
	Theta	= 20
	Str0	= Programs name

OUTPUT:	
	None (Protects program)
		
NOTES:
	None

	
--------
 17.  UnProtect
--------
INFO:
	UnProtects a program
	
INPUT:  
	Theta	= 21
	Str0	= Programs name

OUTPUT:	
	None (UnProtects program)
		
NOTES:
	None

	
--------
 18.  Hide
--------
INFO:
	Hides a program
	
INPUT:  
	Theta	= 22
	Str0	= Programs name

OUTPUT:	
	None (Hides program)
		
NOTES:
	Hiding compatiable with FileMan (Ion program).  Unhiding
	a program that hasnt been hidden with this libary or
	compatiable will result in the first letter of the
	program being wrong.

--------
 19.  UnHide
--------
INFO:
	UnHides a program
	
INPUT:  
	Theta	= 22
	Str0	= Programs name

OUTPUT:	
	None (UnHides program)
		
NOTES:
	UnHiding compatiable with FileMan (Ion program).  Unhiding
	a program that hasnt been hidden with this libary or
	compatiable will result in the first letter of the
	program being wrong.
	
	

-------------------------------------------------------------------------
 Printable table
-------------------------------------------------------------------------

Here is a printable table of functions, input, output and description


-------------------------------------------------------------------------
|             INPUT                      ||            OUTPUT           |
-------------------------------------------------------------------------
| Theta |   X   |   Y   |   Z   |  Str0 ||   Z   |     Description      |
-------------------------------------------------------------------------
|   0   |  ---  |  ---  |  ---  |  ---  ||  ---  |   Displays Credits   |
|   1   |  Col  |  Row  | Char  |  ---  ||  ---  | Displays Char (Home) |
|   2   |  Col  |  Row  | Char  |  ---  ||  ---  | Displays Char (Graph)|
|   3   |  Col  |  Row  |  ---  | String||  ---  |Displays String (Home)|
|   4   |  ---  |  ---  |  ---  |  ---  ||  ---  |   Text Inverse On    |
|   5   |  ---  |  ---  |  ---  |  ---  ||  ---  |   Text Inverse Off   |
|   10  |  ---  |  ---  |  ---  |  ---  ||  Dir  |   Arrow key Input    |
|   11  | Tone  | Durat |  ---  |  ---  ||  ---  |      Play Sound      |
|   12  |  ---  |  ---  |  ---  |  ---  ||  ---  |    Invert Screen     |
|   13  |  ---  |  ---  |  ---  |  ---  ||  ---  |     Turn Calc off    |
|   14  |  ---  |  ---  |  ---  |  ---  ||  ---  |   Run Indicator Off  |
|   15  |  ---  |  ---  |  ---  |  ---  ||  ---  |   Run Indicator On   |
|   16  |  ---  |  ---  |  ---  |  ---  || Cont  |     Get Contrast     |
|   17  |  ---  |  ---  | Cont  |  ---  ||  ---  |     Set Contrast     |
|   18  |  ---  |  ---  |  ---  |  ---  ||  Ver  |     Lib Ver Info     |
|   20  |  ---  |  ---  |  ---  | Prog  ||  ---  |      Protect Prog    |
|   21  |  ---  |  ---  |  ---  | Prog  ||  ---  |     UnProtect Prog   |
|   22  |  ---  |  ---  |  ---  | Prog  ||  ---  |       Hide Prog      |
|   23  |  ---  |  ---  |  ---  | Prog  ||  ---  |      UnHide Prog     |
-------------------------------------------------------------------------