home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug106.arc
/
DBSRC102.LBR
/
DBSOURCE.DQC
/
DBSOURCE.DOC
Wrap
Text File
|
1979-12-31
|
10KB
|
267 lines
Documentation for DBSOURCE and DBSRC2
Versions 1.02 3-1-85
Copyright (C) 1985 by Merlin R. Null
The DBSRC102 library should contain the following files:
DBSOURCE.COM DBSOURCE, reads encoded dBASE II command files.
DBSOURCE.BAS The MBASIC Source for the above program.
DBSOURCE.HLP Help file for DBSOURCE.
DBSOURCE.DOC This documentation.
DBSRC2.COM A variant of DBSOURCE
DBSRC2.BAS The MBASIC Source for the above program.
DBSOURCE.CRC Various stats for checking these files
********** DBSOURCE.COM is a stand alone COM file that
* NOTE * does not require BRUN.COM to run. It is
********** compiled MBASIC for 8080 or Z80 machines.
DBSOURCE
DBSOURCE will take a dBASE II command file that has been
encoded with ENCODE , Ashton-Tates's DBCODE or with Gene Head's
DB-SQZ5 or any one of several other commercial encoding programs
and generate a runable source file. DBSOURCE can also send the
output to the printer or you may view the output on your console.
It will not decode a dBASE III file. DBCODE for dBASE III uses a
more complex partial compiler.
This type of file is encoded for one of two reasons. First,
it protects the program file from being viewed or modified.
Second, the encoded programs run about 30% faster. I feel that
the latter reason is far more important. The level of protection
that this type of encoding offers is only moderate. Programs run
faster because the files are partially tokenized and all comments
are removed.
Encoded command files are for use with dBASE II version 2.4
or higher. A decoded file might require some translation to run
on an earlier version of dBASE II.
Installation
To install DBSOURCE, just run the program. It is self
installing. If the clear screen data file, CLS.DAT, is missing
on the disk with DBSOURCE, a new one will be generated. You will
be asked for the decimal values of your clear screen sequence.
For example, on a KayPro or Osborne CP/M machine just enter:
Clear screen character 1? 26
Clear screen character 2? <RETURN>
CLS.DAT will then be written and you will go directly to
operation of DBSOURCE. If the title screen is preceeded by a
clear screen, the installation was successful. If the title
screen scrolls on, it failed. If it fails, exit the program,
erase CLS.DAT, and run DBSOURCE again. If you don't like the
clear screen function, simply enter 10 when asked for your clear
screen sequence. For each 10 you enter DBSOURCE will scroll one
line in place of the clear screen. My older program, CLEARSET,
will still generate a correct CLS.DAT for this version of
DBSOURCE.
Calling a Directory Listing
To call a directory from the title screen simply enter the
drive you wish to list.
Filename.CMD or Drive:? A:
This will list the directory of drive A and give the prompt
again.
Directory of drive A:
FOO .CMD DBSOURCE.BAS DBSOURCE.COM BRUN .COM A10 .CMD
ENCODE .BAS ENCODE .COM MBASIC .COM D .COM SAMPLE .CMD
BOOKS .DBF BOOKS .FRM DBASE .COM CLS .DAT CLEARSET.BAS
CLEARSET.COM DBASEMSG.TXT DBASEOVR.COM B4 .CMD R2D2 .CMD
DBINDENT.BAS DBINDENT.COM ELIZA .BAS A10 .SRC A10 .BAK
CLONE .CMD TEST .CMD CLONE .SRC A10 .OLD DBSRC2 .BAS
DBSRC2 .COM
Filename.CMD or Drive:?
The ZCPR like drive call of A; will also work to call the
directory, even if you are not running ZCPR. The Filename.CMD
may be entered here or a <RETURN> will redisplay the start
screen.
Help File
The help file may be called from DBSOURCE by entering a "?"
at the title screen. It contains several screens of condensed
information on how to run DBSOURCE.
Filename.CMD or Drive:? ?
Viewing an Encoded dBASE II File
To view the encoded dBASE II command file "SAMPLE.CMD",
simply type in the file name at the title screen prompt.
Filename.CMD or Drive? SAMPLE.CMD
Just use control S to stop the scrolling of the file or
control C to quit the program. The file to be viewed must have
the extension .CMD
Options
P Send the output to the printer. Does not generate a file.
F Send the output to a file.
N Turn off console output. May be used only in combination
with P or F options.
Options must preceded by a space. Extra spaces entered with
the options do not matter. SAMPLE.CMD P F N is equivalent to
SAMPLE.CMD PFN.
Direct output to Printer
Use the P option to direct the output to the printer:
Filename.CMD or Drive? SAMPLE.CMD P
This does not generate a disk file. It will only print the
file and display the output on the screen.
Creating a source File
To generate a runnable source file from an encoded dBASE II
.CMD program, use the F option:
Filename.CMD or Drive? SAMPLE.CMD F
This will write a file called SAMPLE.SRC. If SAMPLE.SRC
already exists, you will be prompted with the message:
[]=========[]
[] WARNING []
[]=========[]
SAMPLE.SRC already exists! A 'NO' here will cause the current
SAMPLE.SRC to be renamed to SAMPLE.BAK
Do you wish to overwrite SAMPLE.SRC (Yes/No/Quit)?
The output file will be named SAMPLE.SRC. After you move
this file to another disk and rename it to SAMPLE.CMD, it should
run the same, only somewhat slower, as the encoded original.
No console output
The N option shuts off the normal presentation of the output
file on the console. This helps speed up generation of a file or
printing of the output. It can not be used unless the F or P
options are used. I do not like it with the F option. I prefer
to see that the decoding is being done correctly.
How does it work?
Files that have been pseudo compiled by DBCODE, ENCODE or
DB-SQZ5 have the first reserved word en each line tokenized. The
tokens are bytes with decimal values between 128 and 194. 128
represents IF, 129 is ELSE, 130 is ENDIF etc. Examine at the
lookup table at the end of DBSOURCE, if you are curious.
The space at the end of the reserved word has been removed
and the rest of the line converted to high order bytes by XORing
them with 255.
To decode, DBSOURCE just creates a print string starting
with the reserved word found in the table, adds a space and then
adds to it byte by byte using XOR 255 to return to the original
value.
History of DBSOURCE and DBSRC2
Rev. 1.02 3/1/85 Added self installation of clear screen and
the COM file is now stand alone.
Rev. 1.01 2/17/85 Modified for compatibility with MBASIC 5.20
under Apple CP/M. This required changing TEXT$ to TXT$ as TEXT
is a reserved word in the apple CP/M basic.
Versions 1.00 released 1/6/85
=================================================================
DBSRC2
DBSRC2 was created to decode several programs that had
either included some additional encoding to mix up the reserved
words. Or, I ran into something that was encoded by a variation
of DBCODE. If you decode a file with DBSOURCE and there are some
strange placements of reserved words, you should try DBSRC2 on
it. You might see something like QUIT in the middle of the file
or UNLOCK in place of some other word.
If you find that there are still errors in keyword
translation with either DBSOURCE or DBSRC2, you may want to
generate your own version of DBSOURCE. Examine the remarks just
before the table of reserved words in DBSRC2 to see what I did to
generate this variant. It involves substituting reserved words
in the table. If you remove a word from the table and put it at
the end, all reserved words located after the removal will be
offset by one. This was done with DBSRC2. If you find only a
single keyword is wrong, you should make a swap with the correct
word in the DATA statements.
Other Related Programs
I have written two other programs for dBASE II that have
been released in other library files. They are, ENCODE and
DBINDENT. ENCODE is the reverse of DBSOURCE. It creates the
tokenized command file. DBINDENT is a dBASE II pretty printer.
Current versions as of the release of this library are in
ENCODE4.LBR and DBINDNT1.LBR.
COPYRIGHT AND LIMITATIONS
All of the above programs may be copied for private,
noncommercial use, provided that all copyright notices remain
intact. In fact, making copies for your friends is encouraged.
They may also be included in distribution disks from non-profit
computer clubs, if only a nominal charge of less than $20.00 per
disk is charged to cover costs of disk, copying and shipping.
These programs are NOT "Public Domain". To release a program to
public domain causes all control of distribution and sale to be
voided. Any sale of these programs that does not comply with
these conditions will be prosecuted.
None of the programs named at the beginning of this library
documentation may be sold for profit or used as an inducement to
buy any other product or program without the written permission
of the author:
Merlin R. Null
P. O. Box 9422
N. Hollywood, CA 91609
(818) 762-1429
A small donation, like $5.00, would help me with maintaining
these programs, but is not required. These programs were written
for DBASE II users and programmers, not with profit in mind.
Please contact me if you have any suggestions, gripes or
comments about DBSOURCE or DBSRC2.
dBASE II, dBASE III, RUNTIME and DBCODE are trademarks of
Ashton-Tate. MBASIC is a trademark of Microsoft.
ed to cover costs of disk, copying and shi