-
Notifications
You must be signed in to change notification settings - Fork 0
jwinarske/CPGSC
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
1/19/94 Dear Reader, This is a printout of the most salient portions of the README.NOW file on your distribution disk. The code on the disk is for Second Edition of The C Programmer's Guide to Serial Communication. I'm sorry to report that a rushed production schedule at the publisher resulted in a First Printing with an unacceptable number of errors. At my request, remaining copies of this printing are being removed from the shelves. The corrected Second Printing ought to be available about February 1, 1994. Owners of the First Printing of the Second Edition may obtain a free copy of the Second Printing by contacting Jordan Gold at (317) 581-3669 (Compuserve 71075,446). If you have any problems obtaining a replacement, please let me know. This disk also works for the First Edition. A few functions have changed and I've taken a few new approaches. In general, the new edition contains chapters and code for advanced interrupts, facsimile, and protocol modems. I make improvements to the code more or less continually, so you'll quickly discover minor undocumented discrepancies between the book's code and the code on this disk. You'll also discover that I've left in place many of my debugging aids that were removed for publication. Lines containing the odd-looking comment "" or lines beginning with "//" identify debugging lines. Now, here's how you use this disk: 1. You'll need about 1.2M to hold the source; 2.1+M to hold the source, obj's, and libraries. I developed under Microsoft 6.00A, but have verified (quickly) under 7.0. All source compiles at Warning Level 3 with no warnings. The NMAKE files assume that LIB.EXE, LINK.EXE, and MASM.EXE are in the path, but I've included the assembly language .LIB and OBJ files just in case you don't own MASM. 2. The code is distributed in a self-extracting archive, CPGSC.EXE. 3. Log into the root directory on the drive where you wish to install the code. Insert the disk into a floppy and type: CPGSC -d x: where x is the drive where you want to install it. DON'T FORGET THE "-D"! 4. De-archiving creates a copy of my development directory structure on the specified drive: x:\ <------------------your drive id |--!PG | +--SIO | | +--ASM | | +--OBJS | | +--BUOS | | +--OBJS | | +--CRC | | +--OBJS | | +--FAX | | +--OBJS | | +--IBMPC | | +--OBJS | | +--MISC | | +--OBJS | | +--MODEM | | +--OBJS | | +--PROGS | | | | +--TERMFUNC | | +--OBJS | | +--U16X50 | | +--OBJS | | +--XMODEM | | +--OBJS | | +--_SIO | | +--OBJS +--COMPILER +--INCLUDE +--SIO 5. The directory \COMPILER\INCLUDE\SIO contains the INCLUDE files for my code. Create a new directory named SIO under your compiler's INCLUDE directory. Copy these .H files to it. After this copy you may erase the entire \COMPILER subdirectory. 6. In each directory you will see DIRNAME.NMK. These are input files for Microsoft's NMAKE utility. 7. Included are batch files REBUILD.BAT (builds the entire library from scratch) and BUILD.BAT, which just runs the make file in each subdirectory. 8. If you've changed any of the path names from those shown on the tree above, CD to the PROGS directory and edit the paths in PROGS.RSP, the linker response file. 9. The NMAKE files require the following variables in your environment: LIB This is the variable used by your compiler for libraries. INCLUDE This is the variable used by your compiler for include files. (I assume this one's already present.) SIO_BASE The base subdirectory for the C source: x:\!PG\SIO where 'x' is the drive you want to install on. SIO_INC_PATH This is the subdirectory for this project's includes. The source code assumes that the includes are under INCLUDE, but I've provided a NMAKE variable for future flexibility. CL Environment arguments for the compiler: /AS Desired Model /W NMAKE quits on compiler warnings You may wish to use the /Zid (Add Codeview information and line numbers), but be aware that this may cause the compiler to die with the message "Compiler out of far heap space." In other words, you need to have lots of memory available at the DOS prompt. 10. Assuming you've got all the environment variables installed, CD to \!pg\sio and type REBUILD 11. The batch file compiles all the source, creates the libraries, and links the TERM7 program from the book. TERM7 will be about 70K. It will be a whopper if compiled with the /Zid option and linked with the /CO option. If you wish to remove Codeview info from your OBJ's, just delete the /CO from TERM7.RSP. 12. Now that you've carefully read everything in this file and BEFORE running the batch file: DEL \!PG\TRAPDOOR.BAT 13. To compile Large MODEL: A. Change /AS to /AL in the CL environment variable. B. Change the model defined in ASM.NMK. In case you don't have MASM, both LIBs are provided, ASMS.LIB (Small) and ASML.LIB (Large). Copy the desired model library to ASM.LIB. 14. By default, the files BUILD.BAT and REBUILD.BAT have the NMAKE commands for the ASM directory REM'ed out. If you own MASM and wish to modify the assembler, remove the REM statements. Model control is via the /DSMALLMODEL to /DLARGEMODEL directives in ASM.NMK. 15. The TERM7 program defaults to COM3. To override, enter the ordinal number of the port you desire (i.e., COM1 is 0). 16. If you're developing applications that must run in a Windows 3.x DOS box, you won't be able to use the 16550 ISR shown in the book. Although Windows does not support the 16550, many software packages provide serial drivers that do. Alas, all I have seen treat the 16550 TIMEOUT interrupt correctly. For this reason, you'll find that s_open doesn't not use the 16550 ISR. 17. Read the file NEWSIO.DOC in the IBMPC directory for instructions on how to automate changes to the COMxSIO.C files.