Dec 232017
 
Counting Cursor. Cursor counts spaces as it move. Use for screen layout.
File CCUR31.ZIP from The Programmer’s Corner in
Category Display Utilities
Counting Cursor. Cursor counts spaces as it move. Use for screen layout.
File Name File Size Zip Size Zip Type
CCUR.COM 16858 8844 deflated
CCUR.DOC 15222 4817 deflated

Download File CCUR31.ZIP Here

Contents of the CCUR.DOC file


TITLE: CCUR.COM -- COUNTING CURSOR v3.1
PURPOSE: On-screen dynamic point-to-point width cast-off, screen
saver, coordinate recorder, character value decoder
DATE: 12/14/88
AUTHOR: Thomas A. Lundin
Graphics Unlimited Inc.
3000 2nd St. N.
Minneapolis, MN 55411
(612) 588-7571

COPYRIGHT: (c) 1988 by Thomas A. Lundin
All Rights Reserved

This revision of the program and documentation supercedes all
prior versions.

DESCRIPTION: CCUR places a movable cursor on a static screen display and
lets your fingers do the walking while the cursor does the
counting. The counter can be toggled on or off and initialized
to zero or one anywhere on the screen, giving you a quick count
of the characters spanning two points.

Features of CCUR include:
. screen coordinate readout as X,Y values
. full-movement cursor positioning
. skip forward or backward by offset value
. current time & date display
. decimal & hex display of character under cursor
. field width value capture
. screen coordinate value capture
. screen capture
. screen blanking
. memory resident or stand-alone operation
. optional hotkey pass-through to suspended program
. program settings saved between call-ups
. CGA and monochrome detected

BACKGROUND: In the course of my involvement in media conversion services --
for example, taking a 9-track magnetic tape and transferring
the data onto an IBM PC floppy -- I am often given a data base
file of some kind to be processed from a fixed-length format to
comma-delimited SDF or some such type. Usually, these files
are not accompanied by any record layout, and I previously had
resorted to calling up a portion of the file using the TYPE
command (or some screen editor) and manually counting
characters to establish the layout. Accuracy is critical, so
I'd usually go through this counting procedure at least twice
until I was satisfied that the field lengths I'd come up with
were correct. The public domain program RULER.COM had been a
big help in giving me a visual point of reference on the screen
when counting across large voids of blank spaces, so, taking
the idea behind RULER a step further, I wrote CCUR, the
Counting Cursor program.

OPERATION: The command line invocation is:

CCUR for the memory-resident version
CCUR /n for the non-resident version

The current display is left as-is, but a status line is
displayed on line 25 of the screen. A block cursor is
positioned at the same screen position used by the suspended
application.

MEMORY RESIDENT NOTES:
Use the ALT-R combination to invoke the program at any time.

If you press ALT-R a second time, CCUR will terminate and pass
the ALT-R through to the suspended program. This allows any
program which normally needs the ALT-R combination to still
have use of that key.

To remove CCUR from memory, you must reboot your computer. If
you attempt to load CCUR into memory more than once, an
"already resident" message will appear.

THE STATUS LINE:
The left portion of the status line displays the hex and
decimal values of the character at the current cursor
position. The right portion of the status line provides the
current recording mode (for Widths or Coordinates), a
readout of the current counter value (or -OFF-), the offset
value (0 or 1), and the current cursor row/column
coordinate.

F1 - Help key
A pop-up menu will appear at the top of the screen showing
a list of available commands and the current date and
time. Press any key to remove the menu and continue where
you left off. Pressing a command key from the help menu
will execute that command immediately.

Arrow Keys
These keys operate as you would expect them to.

HOME key
Places the cursor at the start of the current row, updates
the counter accordingly.

END key
Places the cursor at the end of the current row, updates
the counter accordingly.

PgUp key
Places the cursor in the upper left screen corner, updates
the counter accordingly.

PgDn key
Places the cursor in the lower right screen corner,
updates the counter accordingly.

5 key (num pad shift 5)
Places the cursor in the middle of the display area,
updates the counter accordingly.

Gray (-) key
Allows input of a numeric value to be subtracted from the
current cursor location. The cursor is positioned
backward the number of characters specified by the value,
and the counter is updated. If the value would cause the
cursor to be displayed past the HOME position, the
operation is ignored.

Gray (+) key
Allows input of a numeric value to be added to the current
cursor location. The cursor is positioned forward the
number of characters specified by the value, and the
counter is updated. If the value would cause the cursor
to be displayed past the END position, the operation is
ignored.

'0' (zero)
Causes the base counter and coordinate values to begin at
zero. This command is provided for notational
convenience, as you might be accustomed to counting
your widths and coordinates from zero.

'1' (one)
Causes the base counter and coordinate values to begin at
one. This command is provided for notational convenience,
as you might be accustomed to counting your widths and
coordinates from one.

'C'ount
If the counter is currently OFF, this command turns the
counter ON and sets it to zero. If the counter is
currently ON, this command turns the counter OFF. An
active counter can be cleared by pressing 'C' twice.

'M'ode change
Toggles the recording mode between Width and
Coordinate. Width mode is used for recording the
distance between two points on the screen, for
example, to calculate data base field widths.
Coordinate mode is used to capture the current X,Y
screen position for reference in, say, a forms
generator program.

'W'rt
If the Width mode is active, and the counter is ON, the
current value in the counter display is recorded in
memory and can be written to a disk file when the
program is exited. If the Coordinate mode is active,
the current screen coordinates are recorded in memory
and can be written to a disk file when the program is
exited. The Wrt (Write Count) command can be executed
multiple times; each width or coordinate value recorded
will be separated by a comma. A block following the
word "Count" -- or a diamond between the coordinate
values -- will blink to inform you that the recording
has taken place. A 400-character buffer is used to
store the values.

'PrtSc' (unshifted PrtSc)
The current screen image will be sent to the printer or to
a disk file. If no file name is provided at the prompt,
the printer is used. Each saved screen line is terminated
by a carriage return/line feed combination and trailing
blanks at the end of screen lines are removed. This Print
Screen routine is much faster than the one provided by
DOS.

'B'lank screen
Causes the screen to go completely blank until another
keystroke is depressed. That keystroke restores the
screen to its pre-CCUR state. (Screen blanking is
intended for use in text mode only.)

ESC key or 'Q'uit
Exits back to DOS in the stand-alone version or exits
back to the suspended application in the
memory-resident version. If the Wrt command was used,
you will have the option of writing the recorded widths
or coordinates to a disk file before exiting. If you
don't write them out, the list of values will be kept
in memory indefinitely, and can be added to. If you
choose to flush the recorded values, but provide no
file name at the prompt, the printer is automatically
chosen. Printed width values are separated by a comma.
Each printed coordinate pair is separated by a comma
and terminated with a carriage return/line feed.

NOTES: CCUR was written in Lattice C 3.1 on a Leading Edge Model D.
Character string video I/O routines were adapted for use
from JCLIB.C by Dr. Jim Conn. The low-level TSR functions
were provided by John Riley of Lattice Inc. and were
modified for improved environmental stability and keyboard
interrupt usage.

ANOMALIES: If CCUR is invoked while a DOS call is in process, the
system may hang upon return to the suspended program.
Fortunately, most editing and list programs are immune to
this condition. (It seems to be a bug in some versions of
DOS, because on some systems, the problem never occurs.) The
workaround for this problem is to call CCUR in non-resident
mode. On the Blue Chip PC, rebooting may not reset the
interrupt vector I use for determining preload, and so you
may get the "already installed" message even though it's
NOT. The workaround is to turn the machine off and on
instead of rebooting. This also may be a DOS
version-dependent problem.

MACHINE: IBM PC or compatible, 128K memory, DOS 2.x or 3.x. The
memory-resident version eats up about 24K of RAM.

DISCLAIMER: This program is provided as-is. It has been tested on a
dozen different PC Clones from XT to 386 models and has been
found to be stable on these machines even when running other
TSR programs, and yet: It may not do what you want it to do,
and it may not work on your particular system. IN USING THIS
PROGRAM, YOU ASSUME ALL RISK OF DAMAGE AND LOSS.

LICENSE: You may copy this program all you want. Share it. Upload it.
Use it. Don't charge any money for its distribution or use,
unless a portion of what you charge is contributed to me.
Also, don't integrate this program with any other program or
commercial service and try to claim it's your property; that's
unethical and dishonorable.

HISTORY: Ver. 2.2: More changes to low-level interrupt handler;
also added a signature routine which checks for
CCUR already in memory to avoid eating up RAM
due to multiple loads.
Ver. 2.4: Keyboard interrupt usage.
Ver. 2.5: Changed preload signature routine to scan for
an unused interrupt vector between 67h and 60h.
Ver. 2.6: Added screen blanker routine.
Ver. 3.1: Coordinate mode added; retention of program
state; decimal character display; optional
value flushing on exit; initial cursor
position taken from screen.

BEG: If you find this program to be of value, contributions in
any amount ($10 suggested, please make payable to Thomas A.
Lundin) will be gratefully accepted. If you choose not to
contribute, at least upload this program in its ARCed
version to as many BBSes as you can log onto.

Contributors who donate $25 will receive the source code to
the program.

Send comments/bug reports/contributions to:


Thomas A. Lundin
Graphics Unlimited, Inc.
3000 Second Street North
Minneapolis, MN 55411
(612) 588-7571


You can also reach me at my BBS home base:

PC-ROCKLAND BBS
If you can't find a program here,
it probably doesn't exist!
(914) 353-2538
(Leave msg. for "Tom Lundin")

Thank you for using CCUR.



 December 23, 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)