Dec 192017
QuickC DOS batch procedure and documentation.
File CBAT_A.ZIP from The Programmer’s Corner in
Category C Source Code
QuickC DOS batch procedure and documentation.
File Name File Size Zip Size Zip Type
C.BAT 435 233 deflated
CBATDOC.TXT 7988 2616 deflated

Download File CBAT_A.ZIP Here

Contents of the CBATDOC.TXT file


Version A

A batch file to run the

Microsoft QuickC 2.0 Environment

April 28, 1989

Wally Moyer
7 Pearl Drive
Duncannon, Pa. 17020

717-834-5765 (voice only)


C.BAT Page 2

C.BAT for Microsoft QuickC 2.0


Just about everything in this "bat" procedure is mentioned in one
place or another in the QuickC manuals version 2.0. This
procedure is an attempt to bring it all together for those
running other applications on their PC between QuickC sessions.


This "bat" file was developed to solve certain problems and
concerns in running Microsoft QuickC. The following paragraphs
describe those issues along with a description of the batch
procedure. In addition this "bat" file automates the management
of the generation and the subsequent resetting of the QuickC DOS

NOTE: This documentation uses quotation marks around DOS command

Commentary On "C.bat":

1.) The Project Library Concept:

All C source, object, make and "EXE" files relating to a given
task, project or person are kept in their own library which is a
DOS directory. The default library name is "C-LIB01" on the "C:"
drive. This directory must exist before using this procedure.

Any other program source library name which is an existing DOS
directory name may be specified on the command line as follows:

C C:\myprogs

The single character "C" is naturally the name of this procedure
and "myprogs" must exist as a DOS directory before running
"C.bat". The files menu in QuickC will point to this directory
without further direction to Microsoft QuickC. If you just enter
"C" on the command line the default "C-LIB01" will be the

C.BAT Page 3

2.) Insure use of the Microsoft QuickC Link program and protect
whatever LINK program is in your normal DOS pathed directory:

The procedure assumes that the regular LINK.exe program is in a
directory "C:\DOS". It renames that linker "TLINK.exe" while you
are in Microsoft QuickC. The rename occurs after leaving
Microsoft QuickC . This rename operation insures that the linker
that came with your copy of Microsoft QuickC will always be
used. Insure that the first "PATH" statement in "C.BAT" matches
the one generated during your first Microsoft QuickC installation
and stored in the file "NEW-VARS.bat" (see page 13 in the Up and
Running manual). This same technique can be used to protect DOS
programs that have the same names as program examples in the C
FOR yourself manual (i.e. SORT.exe from sort.c). My preference
is to save the example from the QuickC help system under a
different name. LINK is a different case.

3.) Set and Reset the Microsoft QuickC DOS environment:

Since most solid state electronic equipment fails at power on I
leave my PC on most of the time. Since I may run other
applications between Microsoft QuickC sessions, I do not include
the "SET" statements form "NEW-VARS.bat" (see page 13 in the Up
and Running manual) in my AUTOEXEC.bat file. "LIB" may just be
used by some other product I might own and use. This procedure
also resets the "SET" commands upon leaving for the sake of good
housekeeping in the DOS environment. There is a serious
possibility of running out of DOS environment space if "C.BAT" is
run many times in one day, while other applications are run in-

4.) Specify The Correct Graphics Display Technique before
running Microsoft QuickC:

MSHERC is required to run graphics on a monochrome system with a
Hercules graphics CRT card. The "/b" on the "QC" execution line
is also necessary.

If the system has any other type of display hardware then use the
code specified on page 21 in the Up and Running manual on the
"QC" command line within "C.bat". Delete the "MSHERC" line from
"C.bat" for all other types of CRT graphics control cards.

5.) Allow the possibility of other command line parameters:

C.BAT Page 4

In order to pass additional command line parameters to the actual
"QC" command line, within "C.bat" enter them after the source
library name on the command line as follows:

C C:\myprogs parm1 parm2 parm3

In this case the source library name must be specified on the
command line even if it is the default library name. Anyone with
a reasonable solution to this requirement please write me.

6.) Reset the PATH to the normal defaults:

The purpose of the last "PATH" statement is to reset your system
to its normal defaults. Logically this line will match the
"PATH" statement in your AUTOEXEC.bat file.


This documentation and procedure are presented in the hope that
it will be of assistance to other individual PC users or groups
of PC users in non-profit settings and/or associations. Any
commercial or for profit use, except electronic BBSs, of this
material is prohibited, without the written permission of the
author. Microsoft and QuickC are copyrights and/or trademarks of

Other QuickC users, please send me your ideas, comments or
corrections and I will attempt to keep this procedure updated...


C.BAT Page 5

Listing Of C.BAT

@Echo off
SET ZZLIB=C:\c-lib01
CD \
REN C:\dos\link.exe tlink.exe
QC /b %2 %3 %4 %5 %6
CD C:\
REN C:\dos\tlink.exe link.exe


 December 19, 2017  Add comments

Leave a Reply