Dec 112017
DBase III+ windowing editor (BIN). Very handy.
File DBASEDT3.ZIP from The Programmer’s Corner in
Category Dbase Source Code
DBase III+ windowing editor (BIN). Very handy.
File Name File Size Zip Size Zip Type
DBASEDIT.ASM 39266 10737 deflated
DBASEDIT.BIN 12435 2752 deflated
DBASEDT3.DOC 7402 3213 deflated

Download File DBASEDT3.ZIP Here

Contents of the DBASEDT3.DOC file


This ARC file contains a different version of the DBASEDIT program available
on several bulletin boards. The original version was a .COM file which
got its parameters from a file and could be run as a stand alone program
although its original and primary use was to be RUN from inside a dBASE III
program. This version is a .BIN file which is meant to be LOADed by dBASE
and called with a parameter. The ARC file includes some sample files and
a dBASE program to show how it can be used. It also includes source code
so that an interested reader can see an example of a fairly complex program
written to be used in this way. I have looked at many examples of .BIN
programs for use with dBASE and none of them showed more than the simplest
of techniques which did not work in this complex situation. I make no claim
that this is the only or best way to do the job, but this code does work.

In the process of getting this program to work, I found out a number of things.
First, the Ashton-Tate manuals have only the most rudimentary information
about LOAD/CALL programs and some of what is there doesn't make a whole lot
of sense. For one thing, they state that the SS and CS registers must be
restored before doing the FAR RETurn. Restoring the SS register is easy,
but doing anything to the CS register is difficult to say the least. It
appears that the setting of some of the flags is also critical and that is
never mentioned. I did not experiment to see just exactly which registers
and flags must be restored. Instead, I took the reliable way out and saved
and restored everything. If you are an assembler programmer and not into
mental masochism, I'd advise you to do the same.

Incidentally, the program as it stands can not be used with Clipper, at least
the Fall '86 version. Clipper passes the segment address of the parameter
data in DX instead of in DS. DBASEDIT would need to be modified in this area
to work.

The approach used in the editor is rather simplistic, at least as far as
inserting and deleting characters is concerned so those operations may be
too slow if you are working with large windows. That operation involves
moving the entire screen after the character for each character entered or
deleted. I needed a line wrap feature and this was the easiest way to do
it, particularly in view of the fact that I wanted to keep the code to a
reasonable size and the complexity of the job did not require the use of a
sledge hammer to drive a tack. It is purely a time/elegance trade off. If
anyone wants to improve it, be my guest. Please send me a copy of the source
if you do.

The system includes an on-line help facilty on F1 and it describes all the
keys used and their functions. I'll reproduce that screen here and the text
can also be read in the assembler source.

AADS Editor Help Screen
Key Function
F1 Invokes this Help screen.
F3 Inserts a line at the cursor position.
F5 Deletes the line at the cursor position.
F7 Deletes from the cursor to end of text.
F10 Ends the Editor session and resumes AADS processing.
Tab Moves cursor to next tab position. (Tabs are set 8 spaces apart.)
Home Moves cursor to beginning of current line.
End Moves cursor to end of current line.
Ctrl/End Clears text to end of line.
PgUp Scrolls the window to the previous page. Shows first line of
text if scroll is at or past top.
Ctrl/PgUp Moves to beginning of first window of text.
PgDn Scrolls the window to the next full page. Stops at last line of
text if scroll is at or past bottom.
Ctrl/PgDn Moves to beginning of last window of text.
Backspace Deletes the charcter ahead of the cursor and moves all following
characters forward one space.
Del Same as Backspace but deletes character under cursor.
Ins Puts Editor in Insert mode. Operates just like dBASE.
Cursor Keys Move the cursor through the text without changing it.

* NOTE - Undefined keys or keys at their limits will beep.


DBASEDIT.BIN is a program to use a window inside a dBASE program to create or
modify a text file. It is used by LOADing the program under dBASE then
CALLing it with a parameter list. The parameter list is generated in dBASE
as a concatenated text string. There are 5 3 byte ASCII strings with the
following parameters, in order:
first row of the edit window,
last row of the edit window,
first column of the edit window,
last column of the edit window,
max number of lines for the data.
They are followed by the 12 byte file name (includes extension) and
one character which should be a Y or N and indicates to DBASEDIT
whether data will be input (Y) or just displayed in the window (N).

Assemble the source (this version used the Microsoft Macro Assembler
Version 5.0), then LINK and EXE2BIN.

Following is a sample segment of dBASE source code to use DBASEDIT:

...Set up code goes here

@ LASTROW+1,18 SAY '[ Press F1 for Editor Help/ F10 when done. ]'


.... other processing follows

The above code would look for the file HELPXXXX.TXT and move the data from
it to the screen if it is found. At the end of editting, a file by that
name would be created. I created the file from a dBASE data base then
restored the original data base by appending from the created file. It
works well and allows some word processor type editting on a dBASE screen.

The DBASEDIT program is placed in the public domain for use by one and all.
The only restriction is that use of the program is entirely at your risk.
I do not accept any responsibility of any kind for any problems or losses
associated with any use of this program. If you do not accept these terms,
don't use the program. By using it you agree to these conditions.

All programs of any reasonable complexity have bugs which will rise up and
strike the unwary in accordance with Murphy's Law or its corollaries. This
program is no exception and I make no warranties of any kind as to its
correctness or usability. It has been in use for some time and there are no
known anomalies. If you find any, I would appreciate knowing about them.
The above disclaimer does not mean to imply that this program is flaky; it
isn't. It is there because this is a sue-happy world and I don't want to get
hurt by giving something away. I hope you find DBASEDIT useful.

Bob White 4-28-88
6643 Bertrand Ave.
Reseda, CA 91335
CompuServe 76266,145


DBASEDT35-24-88A bug showed up in back space which is fixed
in this version. It also changed the back
space to be a simple destructive back space
when not in Insert mode and to delete the
character and space when in Insert mode.

 December 11, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>