Dec 282017
 
Excellent screen generator.
File DURASCRN.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Excellent screen generator.
File Name File Size Zip Size Zip Type
DS.COM 54438 29425 deflated
DS.DOC 18770 6334 deflated

Download File DURASCRN.ZIP Here

Contents of the DS.DOC file


Dura Screen
(C)Copyright J. Adkins 1986, 1987.
P.O. Box 1160
Rialto, CA 92376

Released to public domain 3/9/87

******************************************************************************
This program represents many hours of work. You are encouraged to give away as
many copies as you want. A donation of any amount will be greatly appreciated.
Please send donations to the above address.
******************************************************************************

INSTRUCTIONS FOR USING DURA SCREEN. (C)Copyright J. Adkins 1986.

DURA SCREEN generates fancy color menus and input screens. The number of colors
and complexity of the generated screens are almost unlimited. It must be
mentioned, however, that a large number and variety of colors will cause your
generated program to be larger. A simple one color program might require 50
lines. A program that generates a rainbow of colors and dozens of screen
inputs can go over 500 lines.

Files are written to disk in 8 different formats:

DISK FILE:
A file is saved that contains all the necessary information to write a
program. It is suggested that you use this mode to save all your projects.
Later, it can be retrieved and programs can be generated.

STANDARD SCREENS:
The generated code is designed to work on most all computer systems that can
support Turbo Pascal.

IBM SCREENS:
The generated code will only work on IBM or close compatible screens because
the output is sent directly to the screen memory. These screens are about 10
times faster than the standard screens that use the writeln statement. This
code and the standard screen code can be used in other Turbo Pascal programs.

BASIC SCREENS:
The generated code is written to a disk file in the BASICA language format.
Most IBM color compatible systems should be able to execute this code. You
can also merge it into other BASIC programs.

C LANGUAGE SCREENS:
Non-Color graphics screens are generated in C. The screen color attributes
aren't yet supported in this format.

ASSEMBLER SCREENS:
Like the C Language screens, The screen color attributes aren't yet supported.
The generated code can be assembled, linked and executed.

PROLOG SCREENS:
Screen color attributes are supported, however, it is wise to stick with
fewer colors. Screen input variables of String, Integer and Real are
supported, but type checking is not done on the input.

DBASE III + SCREENS
A 'PRG' file will be created. Screen variable type and length checking is
performed. All screen color attributes are supported.

ANSI COMPATIBLE SCREENS
These files can be 'typed' directly from dos. In order for them to work
properly, the following line should be added to your CONFIG.SYS file:
device = ansi.sys
The ANSI.SYS driver will use all the color attributes and cursor locating
commands to display the file. You can really dress up batch files with this
feature.

ASCII FILE:
A duplicate of your screen (minus color attribute) is saved to a disk file.
This file can be 'typed' directly from DOS, or dumped to a printer by using
a dump utility program. These screens can also be read by Dura Screen with
the 'A' command. Any language capable of displaying block graphics should be
able to read and display these screens. They can be used to dress up batch
files by using the 'TYPE' statement. The following is an example that assumes
you have created and saved a screen called MENU.DAT. Use the Turbo editor and
create the following batch file called TEST.BAT.

PROMPT $P $G YOUR COMMAND
ECHO OFF
CLS
TYPE MENU.DAT

This is the start of an elementary DOS Menu system. It only illustrates some
of the possibilities of Dura Screen.


***********************************************************
Compiling Dura Screen:

The source code for Dura Screen is NOT in public domain. To acquire a copy,
send $30 to:
J. Adkins
Box 1160
Rialto, CA 92376

IMPORTANT!!! Use the following sequence of commands to compile Dura Screen.
First, load Turbo Pascal. Type the following commands (without the comments).

W
DS
OC { As in OSCAR CHARLIE }
A
100 { Number 100 }
I { As in Ivan }
0 { Zero }
Q { As in Quit }
C { As in Compile }

The parameters prevent the program from using all the stack space.


GENERIC MS-DOS MACHINES
If your machine isn't fully IBM compatible, you may want to avoid the fast
screen procedures in ds. Two extra include files are provided for you to use
if your machine has a different video address than IBM. Change the include
section of DS.PAS as suggested:

{$I DSMON.INC}
{$I DSFW.INC}
{$I DSEXIST.INC}
{$I DSEXCHG.INC}
{$I DSDIR.INC}
{$I DSCOLOR.INC}
{$I DSEXEC.INC}
{$I DSBORD.INC}
{$I DSLOGO.INC} { Replace with LOGO.INC if not true IBM compatible }
{$I DSVALS.INC}
{$I DSANSI.INC}
{$I DSIO.INC}
{$I DSVIEW.INC} { Replace with VIEW.INC if not true IBM compatible }


DURA SCREEN COMMANDS

From the DOS prompt, type DS and press the ENTER key. The screen will go
blank and you will see a one line menu at the bottom of the screen. It is
impossible to display all the DURA SCREEN commands on one line. The most often
used ones are displayed.

CURSOR CONTROL: The arrow keys move the cursor up/down/right/left. Get the feel
of the cursor movement by experimenting with the arrow keys.
The keypad must be locked in the cursor control mode.


A Import ASCII: Files that were created by other programs can be
read by Dura Screen. If you want to start with a clear screen,
you should use the 'E' command before importing the file.

G The GET command: press G on the keyboard (upper or lower case)
and a display of all the ASCII characters will be displayed on
the screen. Pick the number corresponding to the ASCII char-
acter you want to use in your sketch on the screen. Just as an
exercise, type in 176 and press the ENTER key. Move the cursor
with the arrow keys and see what happens. You will see a fancy
pattern move in the direction of the arrow key. DURA SCREEN
is actually drawing while using this pattern (176).

ENTER Pressing Enter resets the cursor mode so you can move around
the screen without disrupting anything you have created. Move
the cursor near the top of the screen and to the left to
10, 5. (The positions are displayed at the top left of the
screen).

B Draws a box. Press the B key. Look at the bottom of the screen.
You will see a choice: Single or Double line box. Press D on
the keyboard. Look at the bottom of the screen again. Move the
cursor to the opposite diagonal corner of where you want your
box to end, then press the X key. A box will appear.


C Color change. Press the C key on the keyboard. Press the T key.
To select the Text color. At the bottom of the screen, you
you will see 15 color choices. key in the number ( 1 thru 30)
corresponding to the color of your choice. Now move the cursor
up to the left top inside our box and to draw another box by
pressing the B key. Colors above 16 are blinking colors. DURA
SCREEN will use them, but they aren't displayed in the color
selection. Press the G key again and select pattern 196. Now
move the cursor with the arrow keys and see what happens.

D Erase a portion of the screen. Move the cursor to the
opposite diagonal corner to erase and press the 'X' key.

E Erase the entire screen and start over.

T Key in text. Move the cursor near the center of the screen.
Press T on the keyboard. Type in some text (a few words). and
press the ENTER key. Now you can begin to visualize using
DURA SCREEN to design a fancy color menu program procedure or
subroutine.

I Input variable. Do you like those fancy programs that have
nice input screens? You know, the ones that jump to different
screen positions for your input? Press I on the keyboard.
Look at the bottom of the screen. Press S (for string).
Dura Screen will ask for a string length. This makes it
possible to do strict length checking in your programs.
Move the cursor to another place on the screen. Press I again.
press S again.
Integer and real variables are also provided for. Strict type
checking will be done in your generated program to prevent the
operator from keying in the wrong value (string for integer,
etc) or crashing the program.

S Save program to disk. Press S on the keyboard. Press D (for
disk file). This way, you can use the code later if you
decide to modify it. Key in the filename (no extension).
A good name would be TEST. Key in TEST and press ENTER.
Press S again (now we want to write a program). Key in the
filename (no extension). Press P for PASCAL program, B for a
BASIC program, E for an ANSI, L for PROLOG, etc.

It is strongly suggested that you use 'F' to save ALL of
your work. This is the only file format that can be re-used
for everything.

Your file can also be saved in ASCII format. These files can
be 'typed' directly from DOS, used in BATCH files, or read by
any program capable of displaying block graphics. It must be
remembered, however, that only the type of file can be
re-used by Dura Screen, because they contain all the infor-
mation needed to write a program.

The files saved with the 'E' (ANSI) format can be 'typed' from
DOS, and will display all the color attributes, etc. For these
files to be successfully displayed, you must have the follow-
ing line in your CONFIG.SYS file:
DEVICE=ANSI.SYS
If the CONFIG.SYS FILE doesn't exist, you must create one.
Here is a suggested method:
COPY CON CONFIG.SYS
DEVICE=ANSI.SYS

Also, 'ANSI.SYS' must be in the root directory. ANSI.SYS is a
device driver that enhances the display and keyboard capa-
bility of your PC.


L Load program file. Press L on the keyboard. Key in the filename
that you previously saved with the S command. The program file
you previously saved will now appear on the screen. If no
extension is given, then '.DSD' is assumed. If an '.ANS'
extension is typed, then an ANSI compatible file will be
expected. For loading ASCII files, use the 'A' command.

V View commands. Press V on the keyboard. A list of commands will
appear on the screen. Press any key to return to your sketch.

/ CUT & PASTE: Imagine you would like to move a block of the
screen to a new location. This command allows you move a
section from the screen to another location on the screen.
This command should be used with caution. It should be
used before any of the 'I' ( Input Variable ) commands.

> EXECUTE DOS: This command allows you to execute most of the
DOS commands, or run another program from Dura Screen. To
Re-Enter Dura Screen from the DOS prompt, type EXIT and press
ENTER.

Q Quit. Press Q on the keyboard. Press Y.

RUNNING YOUR PROGRAM UNDER BASIC: Insert a diskette that has a copy of BASIC
into drive B:
(GWBASIC, BASICA, BASIC, ETC. We will assume it's called BASIC).
Type B:BASIC and press ENTER.
Remove the BASIC diskette. Place your DURA SCREEN diskette in drive B:
Type RUN"B:TEST" and press enter. (This is assuming you called your generated
BASIC program "TEST").
Type SYSTEM to exit BASIC.

RUNNING YOUR PROGRAM UNDER TURBO PASCAL: Insert Turbo Pascal diskette in drive
A: insert DURA SCREEN diskette in drive B:
Type A: press ENTER.
Type TURBO press ENTER.
Press Y
Press L
Press B
Press ENTER.
Press W
type TEST (assuming that's what you called your Pascal program).
Press ENTER.
Press R to run the program.

USING CAPTURE.COM: From the DOS prompt, type CAPTURE and press ENTER.
Now, run any program that has a nice menu you would like to capture. When
the screen appears that you would like to work with, press ,
the same as if you were going to dump the screen to printer. A file will
be created 'DS.ASC' that you can work with in DURA SCREEN with the 'A'
(Import ASCII) command. This allows you to use nice block graphic screens
from other programs in DURA SCREEN.


NOTES:

DURA SCREEN uses block graphics only. It could run on systems that don't
have a graphics card installed. At least it could be easily modified
to run on a particular system. It mainly uses 2 arrays. One array is for
the screen x,y coordinates, the other is for the color attribute. It
doesn't depend on video ram addresses or execute any machine dependent
procedures. It will, however, write IBM specific programs {at your option)
for maximum speed.
The source code is provided with DURA SCREEN so you can modify it to suit your
own needs. The modified program may NOT be resold for profit,

With a little practice, DURA SCREEN can be utilized to create some SPECTACULAR
color screens with formatted input. These programs can be merged into your
own programs.

MERGING YOUR CODE INTO OTHER PROGRAMS:

Let's say you have just written a terrific program. However, you haven't yet
taken the time to polish things up a bit. You run DURA SCREEN and create a
fancy menu. Now, how do we get it into your program?

TURBO PASCAL: (This assumes you know how to use Turbo Pascal).
Load your program into the Turbo Editor. Move the cursor to the
exact position you would like to place the fancy menu. Use the
Load block from disk command. EXAMPLE:
Hold down the CTRL key and press the K key.
Press the R key.
Answer the prompt (Read block from file:) Type TEST.PAS
(or whatever you called the fancy menu).
The TEST.PAS menu code will appear in your program.
You will have to modify the TEST.PAS code a bit.
Change Program Test;
to: Procedure Test;
Change End.
to End;

BASIC: From the DOS system, type BASIC and press ENTER.
Insert the diskette that holds the fancy menu TEST.BAS ...
into drive B:
Type LOAD"B:TEST" and press ENTER.
Now we must determine the line number range to make sure
TEST.BAS will insert itself in the correct place in your
basic program. Let's assume you want your new menu TEST.BAS
to start at line number 500.
Type RENUM 500 and press ENTER.
Now we must re-save the TEST.BAS in ASCII format.
Type SAVE"B:TEST",A
The A is very important here. It tells BASIC to save the code
in ASCII format so it can be merged with other programs.

Insert the diskette that holds your BASIC program that you
want to merge the generated DURA SCREEN code into.
type LOAD"B:FILENAME" (substitute FILENAME with your BASIC
program name. Press ENTER.
insert the diskette that holds your new TEST.BAS program
that you just renumbered and resaved.
Type MERGE"B:TEST" and press ENTER.
Of course, all this will be easier if you put a copy of BASIC
on your drive B: diskette to start with. It will prevent all
the diskette swapping.

Now you can run or resave your program with the new fancy
menu created by Dura Screen. It should run without any changes.



----------------end-of-author's-documentation---------------

Software Library Information:

This disk copy provided as a service of

The Public (Software) Library

If you have received this disk from another source, you
should be aware that disks in the P(s)L are updated monthly
and this copy may not be the latest version available.
For a copy of the latest monthly software library newsletter
and a list of the 800+ disks in the library, call or write

The Public (Software) Library
P.O.Box 35705 - F
Houston, TX 77235-5705
(713) 721-6104

We are not the authors of this program, nor are we associated
with the author in any way other than as a distributor of the
program in accordance with the author's terms of distribution.

Please direct shareware payments and specific questions about
this program to the author of the program, whose name appears
elsewhere in this documentation. If you have trouble getting
in touch with the author, we will do whatever we can to help
you with your questions. All programs have been tested and do
run. To report problems, please use the form that is in the
file PROBLEM.DOC on many of our disks or in other written for-
mat with screen printouts, if possible.



 December 28, 2017  Add comments

Leave a Reply