Dec 212017
 
C Language Screen Generation.
File SCRGEN.ZIP from The Programmer’s Corner in
Category C Source Code
C Language Screen Generation.
File Name File Size Zip Size Zip Type
SCAN.EXE 43382 15791 deflated
SCANP.DOC 11625 3188 deflated
SCRLIB_S.LIB 1536 373 deflated

Download File SCRGEN.ZIP Here

Contents of the SCANP.DOC file


SCAN.EXE Documentation

Finally there is a screen generator available for 'C' under Public
Domain. It is written in 'C' and assembler. The supplied library
contains the assembler screen drivers needed by this routine. There
are only four screen commands in the library. They are described as
follows:

1. SCRCOM1()
This command will clear the screen. It may be used on
all close PC compatibles (ie PC,XT,AT,Tandy 1K to 3K,
TI PC, and Clones). TEXT MODE ONLY ! COLOR or BW

2. SCRCOM2(row,col)
int row;
int col;

This command will position the cursor on the text
screen. Both row and col must be integer values. No
error checking is done for validity on these values.

3. SCRCOM3(character,quanity,attribute)
int character; /* may also be a char or "character" */
int quanity;
int attribute;

This command will write the specified quanity of a
character at the CURRENT cursor position. No update of
the cursor position takes place. The legal values are
from 0 to 255 for character. if a value greater than
80 is used, screen wrap will occur until all
characters specified have been written. There can only
be one character specified at a time to this command.

Attribute is a single value specifying the foreground
and background attributes. This may be determined by
using the following formula:

#define atribute(fore,back) (( back << 4) | (fore & 0xff))

If the formula is included in your program, you may
use it to determine the value required for attribute.

4. SCRCOM4(row,col,fore,back,string)
int row;
int col;
int fore;
int back;
char *string;

This command will write a string of data to the screen
at the specified row and column positions with the
specified attributes. The string must be null
terminated. This command will NOT interpret printf
control sequences. The string must be constructed
before calling this command.

Specialized key sequences are used in this program. They are
described as follows:







[CTRL][HOME]

Will put the user into the main key menu from
the editing screen.
[F1]

Color Selection Menu. This will return you to
the default color attribute of 7 if called. A
line will be printed in the default color.
Using the Up or Down cursor Keys, you may
select another color. Pressing the RETURN key
will make the selected color current and all
text or graphics characters printed from this
point on the screen will have this color. Both
Color and Monochrome are supported
automatically.

[F2]

Special Character Menu. This selection will
allow you to change the characters displayed
in the window on the screen during editing.
Once the selection has been made, the new
characters will be displayed in the window on
the screen. Pressing the function keys during
the editing session will produce the character
represented.

[F3]

This selection will open another window. In
this window, youi will be prompted for a file
name for the screen to be saved to. This
filename must have the .C extension, if you do
not supply one or it is different from the .C
extension, it will be changed. No file
checking is done to see if there is already a
file by the name specified. Two files will be
generated during the save. The first will have
the .C extension as specified, the second will
have the .BIN extension. The second file is
generated to more easily facilitate loading
the file back into memory at a higher speed.
If we had built an interpreter to load the
source code, you could have broken for coffee
while your screen was loading.

The second question to be asked, is for the
routine name. It should be the name used to
call the routine. As these routines do not
accept any input there are no parameters
allowed in the routine name (ie. SCR1(answer))
the program will truncate this to SCR1() for
the call.

The third question is to determine whether or
not to clear the screen before the new screen
is drawn. Pressing the [Y] or [N] key is the
only response needed for this question.







The fourth and final question is to determine
if the information is correct, again the [Y]
or [N] keys are the only responses needed.

Both the third and fourth questions default to
Yes answers if the [RETURN] key is pressed.

[F4]

Load screen. A new window will be displayed
requesting the file name of the screen to
load. Once again the .BIN extension is the
only valid extension used. The extension will
be changed to .BIN if there is none supplied
or a different extension is used.

The screen will then be loaded and you will be
returned to the edit mode.

[F5]
Quit Program will exit the program without
saving the screen currently displayed.

[PGUP]
In the edit mode, this key will place the
cursor in the upper right corner.

[PGDN]
In the edit mode this key will place the
cursor in the lower right corner.

[HOME]
In the edit mode this key will place the
cursor in the upper left corner of the screen.

[END]
In the edit mode this key will place the
cursor in the lower left corner.

Cursor Keys

These keys are used for global movement of the
cursor.

EDIT MODE SPECIAL KEYS

There is a window in the lower half of the screen when
the program is begun. Any window or menu would
naturally be in the way of generating a screen.
Therefore, you may move the window by pressing
[CTRL][S]. This will place the cursor in the window
and by then pressing the up or down arrow keys, the
window will move. If you are at the top of the screen,
the window will only move in the down direction and up
if you are at the bottom. The drawing cursor will
automatically skip over this window so you can't
inadvertantly place a character on the window.

After pressing [CTRL][S] and gaining access to the
window, you may also press [F2] to go directly to the






Special Character Menu.

For drawing the graphics characters, [CTRL][R] will
open a repeat character window. The character that is
currently under the cursor may either be repeated
horizontally or vertically any number of times as long
as you don't exceed the line or column dimensions.
(ie. horizontal for 81 columns or vertical for 25
rows). This command will draw under the window
location.

This program is distributed via the Shareware concept and a
donation of a modest $35 is requested. With the donation you will
recieve the complete library of all memory models for the Lattice
'C' and Microsoft 'C' Versions. And updates for Two Years (Yes 2
years) from the purchase date. The only supplied library for this
program is for the small memory model of LAttice or Microsoft.

All suggestions for improvements are welcomed as with all
shareware, this program is user supported.

Please direct all inquiries ( and donations of course ) to:

MDB Software
2307 Miriam
Arlington, Texas 76010
ATTN: Software Registration


Copyright 1986 by MDB Software

Microsoft is a trademark of Microsoft Inc.
Lattice is a trademark of Lattice Inc.




































 December 21, 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>

(required)

(required)