home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
txt
/
sort.doc
< prev
next >
Wrap
Text File
|
2006-10-19
|
5KB
|
130 lines
SORT
by
Custom Software (C) 1985
WHERE TO LOCATE SORT
Before you can load SORT you must decide where to put it in
memory. The ideal place to locate SORT is at the highest possible
address. If you are using any other machine language programs and
they have the ability to be relocated, we suggest that you locate
SORT at MAXRAM. If this is the case, go into BASIC and type:
PRINT MAXRAM - 834 and press ENTER.
The value printed on the screen will be the address to give to the
loader for SORT. If you have the Disk/Video Interface you may use
this method also.
If you have any other machine language programs in memory
that cannot be relocated you must locate SORT below them. Using
the documentation from the other program, determine the starting
address of that program and subtract 834 from it. This will be
the address to give the loader for SORT.
LOADING INSTRUCTIONS
Decide where in RAM you want SORT to reside by referring to
the section above. From the main menu on the Model 100, position
the cursor over BASIC and press ENTER.
Now type:
CLEAR 0,xxxxx and press ENTER
where xxxxx is the address that you have decided on.
Check that you have SCODE.DO in RAM with no leading or trailing
characters from downloading. The first line should be: CD224221
and the last line should end with thirty zeros.
Load and run SLOAD.BA, the screen will show:
Loader/Relocator
(C) 1985 Custom Software
All Rights Reserved
and prompt you for the starting address:
Type the address you have decided upon and press ENTER.
The loader will read the file named SCODE.DO in RAM and begin
loading it. After the file is loaded you will be given the
starting and ending addresses.
USING SORT.CO
SORT.CO will sort any .DO file in ascending or descending order.
It will sort any number of records by any of 255 different fields.
Each field can be up to 255 bytes (characters) long, fields do not
have to be the same length. You can use any field delimiter that
you wish. When sorting a file it follows some very simple rules:
1) The value of each character is determined by the table on
pages 211-216 of the Model 100 manual.
2) If two fields are identical throughout the length of the
shorter field, the longer field is considered larger.
Therefore, any records where the field to be sorted by is
empty will be moved to the top of the file.
3) Each record in the file, including the last one, must be
terminated with a carriage return.
Position the cursor over the file named SORT.CO and press ENTER.
You will be prompted with:
File to sort?
Type in the name of the file you wish to sort and press ENTER.
The .DO extension IS REQUIRED. You are then prompted with:
Field delimiter (:)?
Type the character that you have used to separate each field in
the record. The default character is a colon and will be used
if you just press ENTER. Next you are asked:
(A) or D?
This stands for Ascending or Descending order. The default
value is A and will be used if you just press ENTER.
SORT.CO will now start to sort the file. After it is done,
you will be returned to the main menu.
NOTE: At any of the above prompts if you wish to ABORT, simply
press SHIFT/BREAK and you will be returned to the main menu.
SORT.CO ERROR MESSAGES
No CR at EOF
Each record in the file must end with a carriage return.
This error indicates that the last record in the file does
not have one. The sort will be aborted with no changes made.
Add a carriage return to the last record and try again.
Not enough memory
The program needs a small amount of free memory to use when
sorting the records. This amount is equal to the length of
the longest record in the file. The sort will be aborted
with no changes made. You must make more room before a sort
will be successful.