
                            

                      *************************************
 
                              String Bank Editor

                      *************************************


This documentation must remain with the string bank editor AMOS source code
/program, example program and the gtstring.proc file.

Because of the release of amos professional there are now two copies of the 
stringbank editor on the disk. stringbankeditor.acc works in amos 1.34 but not 
in AMOSPRO whereas stringbank_editor_pro.acc works in AMOSPRO and not in the
standard AMOS

These files are public domain and can be freely distributed as long as no 
profit is made from their distribution.

The software is supplied as is and no liability can be accepted for loss
or damage to data produced by it`s use.

This program is actually postcard-ware if you find this program usefull please
drop me a line telling me, otherwise I`ll think no one ever bothers to use
my programs and therefore won`t bother releasing any more into the public 
domain. NOTE I am not asking for money, just a little moral support!!

The software is copyright to PODSOFT  if you have any problems please contact
me at

Steve Millidge
10, Hornyold Ave,
North Malvern,
Malvern.
Worcestershire.
England
WR14  1QJ



Now for the interesting bit, I hope.

The AMOS string bank editor creates AMOS data banks of strings which are saved
with your program, just like sprites etc. The SBE is run as an acessory like the
sprite editor and grabs the string data bank. The SBE uses bank 15 for storing
the string so you shouldn`t use this bank for anything else in your programs.

1) Creating a String bank for your program.

There are two methods of doing this.

a) This is the default method and uses the default size bank created by the SBE 
program.  First edit the program you wish to attach some strings to. Then select
Load Others (Load accessory in AMOSPRO)  from the AMOS menus, and load in the 
SBE. Then Select Run Others and run the SBE (Run accessory in AMOSPRO) . 
The SBE has now just created a 4300 byte data bank for strings as bank 15.
Now edit the bank as described below.

b) This is the method if you want to create a bank of size other than the 
default created by SBE. First make sure the program you want strings attached 
to is the current program being edited in AMOS. Then go into direct mode by 
pressing ESC, when in direct mode type Reserve As Data 15,XXX  where XXX is the
size of the data bank you want to create for your strings. Now go back to the 
editor Select Load others ( Load Accessory in AMOSPRO) from the Amos menu and 
load the string bank editor. Now select run others (run Accessory in PRO) 
 and run the SBE, your string bank is now ready for editing

2) Editing a new string Bank.

If this is your first editing session on the string bank select the clear icon
on the icon bar.  This is the icon which is white with a black cross in it, 
it looks a bit like an envelope. If you don`t do this you will find it very
difficult to edit your strings later.

3) The SBE  general layout.

There are two active screens in the SBE one is the icon/data screen ant the 
other is the editing screen.
   The icon/data screen has six icons on it, from left to right these
are Load, Save, Up one page; Down one page; Print and clear bank.
   In the top left is a small cross, if you click on this cross the program
ends.
   Below the icons is the information strip, this contains the current 
address in the data bank, this is for people who like to know this sort of thing
, the current line number and the current character. To the right on the 
information strip is the present buffer/data bank size.

   To move the icon bar/screen press the right hand mouse button and the 
screen will move to wherever the mouse cursor is.

   The other screen (the black one) is the editing screen, this screen
shows the current strings in the string bank. This screen can just be typed 
into like any text editor (however there is no insert of characters purely
type over), the cursor keys, return, and back space all work as they should.
   In this screen only 27 lines are visible at any one time, to move up
and down through the pages of strings use the arrow icons on the icons strip.

4) Saving and Loading

The save and load icons save/load string banks respectively the standard AMOS
requestor is used and the banks are stored as standard AMOS data banks.

5) Printing

To print the strings select the printer icon, the printing doesn`t go via the
PRT: device so I`m afraid no preferences will be taken into account.
The printing is therefore done via the Lprint commands, this means that if your
printer is not attached the program will hang, you have been warned.
The reason the printout does not go via the PRT: device is when programming I
very rarely have this device mounted, feel free to change the printing procedure
if you want, it`s a very simple routine.

6) Clearing the Bank

   This is the final icon on the icon bar and looks a bit like an envelope
this icon fills the reserved data bank with spaces using the command straight
out of the AMOS manual. This has the effect of clearing any unwanted dross out
of the memory and should always be done prior to starting to edit a new string
bank. If you fail to do this remember that the spaces you see on your screen
are not actually initialised as spaces in the data bank so things can become
a bit weird, you have been warned.

7) Bugs

a) One irritating thing, is when you type the last character on a page the  
whole lot scrolls up one line, and you can keep typing, this is irritating and 
I haven`t found a way to get rid of it, any ideas to the address above.

b) Not a bug just a reiteration of the printer warning, MAKE sure the printer is
on line etc before selecting print otherwise the program will hang as it doesn`t
go via PRT: for the reasons stated above.

c) Again just a reminder always select the clear databank option when creating 
a brand new string bank as this will fill the bank with spaces and everything
will then be hunkydory.


8) Acessing the strings from within your program

   The important bit, provided with these files there should be a procedure
called GTSTRING[] this procedure needs to be merged onto the end of your program
 it`s only a few lines long, and any string can then be accessed via a call
to the procedure, passing the number of the string you want to retrieve.
The string numbers from this procedure are the same as the line numbers in the 
SBE i.e line 1 is string 1, line 2 string 2 etc.etc. the procedure passes the 
correct string via param$, look at the source code of the example program for 
an example of how to use the procedure.
Once retrieved using GTSTRING[] the strings can be manipulated just like any 
other strings.
 
GTSTRING is also tacked onto the end of the SBE program for safe keeping, the
SBE program doesn`t need it, it`s just there in case your free copy goes missing
you`ll always have a spare.

9) Some other information which someone may want to know, this program was 
created on a bog standard A500p with no expansions what so ever. The program 
took about a week to write in the evenings and was written within six months of
receiving AMOS especially for providing the text for an educational game I am 
writing, all the text needs to be spoken and there is  a lot of it so to prevent
cluttering of my listings with lines like
READ a$
DATA "Once UPON a Time there was a boy called Jack"
etc etc
for every line I wanted the story to say.

   The default bank size created by the SBE is approx 4300 bytes or 4 pages
of 27 lines a page and 40 characters a line. or 4300 characters approx, one 
character per byte.





               









