HCSDiags Technical Manual

Compiled by Hong Chin Siong.



What is HCSDiags?

It is a free public domain simple disk diagnostics and system information 
program written by Hong Chin Siong using Borland C++ 3.1 and inline Turbo 
assembly langauge. The field covered are: 
	
	System information, 
	Joystick,
	CMOS contents,
	LIM EMS information, and

Based on many rare functions and interrupts, you may find many useful 
information within. It is free, a gift from Singapore to computer owners 
around the globe who want to know something about their computer. Enjoy, 
make use of it and please pass it to people around you! 


System Requirements

HCSDiags is a simple native DOS program, you need:
	MS-DOS 3.30 and above (or equivalent),
	128 KB of base memory minimum,
	IDE/EIDE hard disk system,
	AT 286 and above processor,
	LIM EMS 4.0 or above for EMS reporting.

Please note that IBM PC-DOS 3.30 is NOT the same as MS-DOS 3.30, program not 
tested on SCSI series of hard disk system yet. 286 Protected mode is utilized 
and thus it is common sense to have at least a 286 processor. Not tested on 
8088/8086 system yet because it is very difficult to find users using this 
processor in this time.

I strongly recommend you run this program under the native DOS environment. 
Running under OS/2 DOS session maybe fine (you maybe surprised that I wrote 
the program under OS/2 DOS session environment), but no warranty. Running 
under Windows 3.1, Windows 3.11, Windows 3.11 for Workgroups may cause 
nightmare. Tested on Windows 95 running on Compaq Deskpro XL566 (66 MHz 
Pentium - my office machine) with 16MB Samsung FPM RAM, with no nightmare.
Not tested on Windows NT yet.


Installation

Installation is simple, simply create a directory and copy the decompress the
files to that directory.


About the author (Me?) 

A computer loving guy from a small Southeast Asian country called Singapore. 
I love to do computer programming and play flight simulation games and simple 
arcade games like Pacman, Tetris, shoot-what-you-see type of arcade game, 
etc. I love freewares written by honest programmers, and love to use advanced 
operating system like the IBM OS/2. Anybody who wanted to share his / her 
experience of OS/2 can write to my residential address below:

Hong Chin Siong
19 Marsiling Lane
#03-295
Singapore 730019
Republic of Singapore

Tel: 65-3684984
email: h3684984@singnet.com.sg
Homepage: http://www.singnet.com.sg/~h3684984
	
This file was originally produced using IBM Works Word Processor and was 
later ported into Lotus AMI Pro for OS/2 3.0, and the module logos were 
created using Aldus Type Twister version 1.0 for Windows, and manipulate 
using Aldus Photostyler 2.0 SE, both running under OS/2 Warp's WIN-OS/2 full 
screen.


Why is it free?

HCSDiags, together with all its modules (either incorporated into HCSDiags or
separate modules), are freewares. Why? Simple, because so that you can 
distribute to people who want them without worrying about infringing the 
copyright law, and partly because the programs does not have QC (Quality 
Control), and the most important reason is you will only need System 
Information / Disk Diagnostic tools occasionally. It will be unfair to ask 
user to pay for something they seldom used. 


YOU CAN FREELY DISTRIBUTE THIS PROGRAM PROVIDED YOU DID NOT
EARN ANY PROFIT FROM IT AND THE ORIGINAL DOCUMENTATION (THIS
FILE) IS DISTRIBUTE WITH IT.

Why OS/2 is choosen as a development platform?

You may have seen reviews criticizing OS/2. My advice is don't believe until 
you actually try your hands on it. OS/2 is sensitive, even mixing RAM can 
cause problems, but so far, I have no problem.

HCSDiags was developed on a China Clone Intel 486DX2-66 system running 
OS/2 Warp 3.0, Windows 3.1 and DOS (using only FAT file system and dual 
boot of OS/2), and tested on the same system and Compaq Deskpro XL 566 
with Pentium 66MHz processor (the machine on my office desk) running 
Windows 95. The compiler was run on an OS/2 DOS session of course.

Why choose OS/2? Because:

1. OS/2 DOS session is very customizable. During the testing, I do not have 
to reboot the system to create different testing conditions. I simply close 
the DOS session, click the right mouse button to bring up the setting pages, 
change settings like EMS, XMS, Base Memory, Lastdrive, etc., then restart the 
DOS session.

2. The DOS session crashed so many times during development that the hard 
disk run out of space because Borland C++ 3.1 create swap files for every 
compilation and these files are to be erase after compiling, but was not 
because of the improper termination of the compiler, thus accumulate to about 
10MB total spaces. In native DOS, the reboots will create frustrations, but 
in OS/2 DOS session, "reboot" is simply close the session and reopen it.


	 WARNING! PLEASE READ THIS VERY CAREFULLY:

I am not responsible for any inaccurate results, no warranty of any kind. You 
are running the program at your own risk. You will not reverse engineered 
(decompile, disassembled) or modified any part of this program, and you may 
not include it with your application without my acknowledgement. If you want 
to ensure you got an unmodified program, you can email to me and I will email 
the program to you.

This is an independently developed program, Borland International, Inc and 
other third parties or companies mentioned here are not responsible for the 
program. The third  parties are mentioned for information only.

All trademarks / registered trademarks belongs to respective companies.




SYSInfo Module

Overview

A simple and easy-understanding program written for the IBM PC, PC XT, PC AT 
class. Written in Borland C++ version 3.1 and should run in any PC that is 
about 100% compatible with the original IBM PC. Using mostly documented but 
rare interrupts, this program should be informative enough to keep.

In summary, some of the useful features of this program:
It detects:

	the manufacture of the Disk Operating System (DOS),
	whether or not IBM OS/2 is running and its version,
	free IRQs (not very good yet),
	CD-ROM drives and drive letter assigned, 

and of course, standard detection like base memory, display type, DOS 
lastdrive, etc.


Limitations

This program has some limitations:
	cannot detect and report your memory system,
	CPU (Central Processing Unit) type, 
	cannot detect peripheral's address, and
	DMA and memory maps.

They may be available in future updates.


Software used to develope this module

Borland C++ 3.10 with inline assembly. Developed in OS/2 Warp DOS session 
and tested under MS-DOS 6.00 / Windows 3.10 ,OS/2 3.0 and Windows 95 
environments.


Definitions

Using XXX DOS
Possible values for XXX: IBM DOS or PC-DOS, MS-DOS or Phoenix DOS, Embedded 
DOS, DEC DOS, Compaq DOS, MS Packaged DOS, AT&T DOS, Zenith DOS, Hewlette 
Packard DOS, Packard Bell DOS, Olivetti DOS, Toshba DOS, Novell - Win/386 
dev. ID DOS, MS M-Media Sys. - Win/386 ID DOS, Hewlett Packard DOS, 
PhysTechSoft - PTS DOS, DR-DOS, Novell DOS and lastly Unknown DOS.

These are the DOS that SYSInfo can detect. Note that OS/2 uses IBM DOS and 
because PC-DOS is also manufactured by IBM, their DOS OEM number is the same 
(please refer to DOS OEM number section).

Base memory 
Possible values: 512 KB for older PCs , 640 KB for newer PCs, or other values 
while running IBM OS/2 (depends on the DOS_RMSIZE in the DOS Session settings 
notebook, this is one thing I like about OS/2, you can customize many 
things!). This displays the amount of base memory (memory where application 
programs are run without the need for third party memory manager). Resides 
in the first 1MB of physical memory. For 640 KB systems, the 384 KB is 
reserved by BIOS.

Microprocessor
Possible values: 8 or 16 bits, 32 bits or more.
This shows the data paths of your microprocessor. For 8088, 8086, 80186, 
80286, it should be 8 or 16 bits. 80386SX, 80386DX, 80486SX, 80486DX, 
80486DX2, 80486DX4, P5 and P6 should display 32 bits or more (although P5 is 
64 bits).

Note: This may be inaccurate if you clean-boot the system, cause unknown yet.

Math coprocessor
(also known as FPU - Floating Point Unit)
Possible values: Absent, Present.
This shows whether you have a FPU (Floating Point Unit), or simply math 
coprocessor, is present. The 80486DX family (DX, DX2, DX4),P5 and P6 contain 
an on-chip FPU. 80486SX does not have a FPU. In fact, the 486SX has a FPU, 
but an extra pin on the processor disabled the FPU. The separate 487SX FPU is 
a full-functioned 486DX that "float" the 486SX and take over all 
computations.

DOS version
possible values: XX.YY
where XX = 03 to 99, YY = 30 to 99
The DOS version detecting module can detect many DOS manufacturer. If you are 
running DOS under IBM OS/2, you should see "20.10", which says you are 
running IBM DOS 20.10 (not PC DOS) under IBM OS/2 2.10. OS/2 Warp version 3, 
however, no longer follow this convention. Note that OS/2 Warp DOS is version 
20.30. Windows 95 DOS is version 7.00.

IBM OS/2 version
possible value: XX.YY
where XX = 02 to 99
			 YY = 10 to 99
This option will only appeared if the program detects the DOS session is 
running under OS/2. Note that it is 1/10 of the value of DOS version. OS/2 
Warp version 3 is actually identified as version 2.30 and that is nothing 
wrong here because even the System Information Tool (a program included in 
the Bonus Pak) also identified OS/2 Warp as version 2.30. I do not guarantee 
this to work for OS/2 version 2.1 and below, and version above OS/2 Warp.

DOS OEM number
possible values: 00 Hex, 01 Hex, 04 Hex, 05 Hex, 0D Hex, 16 Hex, 23 Hex, 29 
Hex, 33 Hex, 34 Hex, 4D Hex, 66 Hex, 99 Hex, EE Hex, EF Hex, FF Hex, or an 
unlisted value.

00 Hex      IBM DOS or PC-DOS
01 Hex      Compaq DOS
02 Hex      MS Packaged DOS
04 Hex      AT&T DOS
05 Hex      Zenith DOS
06 Hex      Hewlette Packard DOS
16 Hex      DEC DOS
0D Hex      Packard Bell DOS
23 Hex      Olivetti DOS
29 Hex      Toshiba DOS
33 Hex      Novell - Win/386 dev. ID DOS
34 Hex      MS M-Media Sys. - Win/386 ID DOS
35 Hex      MS M-Media Sys. - Win/386 ID DOS
4D Hex      Hewlett Packard DOS
66 Hex      PhyTechSoft - PTS-DOS
99 Hex      OEM or embedded DOS
EE Hex      DR-DOS
EF Hex      Novell DOS
FF Hex      MS-DOS or Phoenix DOS

True DOS version
possible values: XX.XX
XX=01 to 99
This shows the actual version of your DOS version. MS-DOS setver.exe program 
can trick the system by reporting a different DOS version so that some older 
programs can run. When setver.exe is used, the previous DOS version showed 
the version set by setver.exe. This will report the true DOS version. the DOS 
version and this field should display the same number.

DOS revision
possible values: XXXXXX
XXXXXX = 0 to 999999.
This is only valid if you boot your system with DOS and is meaningless if you 
boot from OS/2. It is disabled when the program detected you boot from OS/2.

DOS resides in XX
possible values: XX
XX = HMA or Conventional memory
If you used DOS=HIGH,UMB in your config.sys file, this should be HMA. HMA = 
High Memory Area. HMA lied between 640KB and 1024KB region. MS-DOS 5.00 and 
above support DOS in HMA. Conventional memory = base memory=1st 640KB.

Boot disk drive
possible values: X:
X = A: to bootable last drive.
This shows which drive you used to boot the computer. If you boot from 
diskette, the value should be A: and C: if you boot from the master hard 
disk.

Diskette drives
possible values: X
X = 0 to 2 (physically).
This shows the number of diskette drives you have in your system physically, 
which means 3rd and 4th logical diskette drives may not be detected (they 
may be detected if your BIOS can support up to 4 diskette drives without 
loading emulating software (device driver).)

Startup video mode
possible values: Color,80 by 25, Color,40 by 25, Monochrome,40 by 25 and  
Monochrome,80 by 25. 
Usually color with 80 by 25 if you have color EGA or color VGA or XGA.

RS-232 (serial) port
possible values: Not detected to 7 or more
Also known as COM ports, where you plucked your mouse connector into. A 
normal system has 2 while some adaptor cards can support 4 or more. 1 for 
mouse and the other usually for external modem. I have seen EIDE (Enhanced 
IDE Super IO card emulates up to 3 COM ports via software).

LPT (parallel) port
possible values: not detected to 7 or more
Also known as PARALLEL port, where you connect from your PC to your printer. 
A normal ystem has 1, again, some adaptor cards can support 4 or more. OS/2 
emulates at least 3 LPT ports via device driver.

Last valid DOS drive
possible values: D to Z (DOS defaults to E)
This value shows the maximum drive letter you can assigned to any drive 
running under DOS. This value is set by the statement LASTDRIVE in config.sys 
file. If this statement is not present, the system defaults to E. In IBM 
OS/2, the value depends on the DOS_LASTDRIVE value of DOS Session settings.

Symantec NDOS version
possible values: 5.0 onwards
Symantec NDOS is an enhanced command processor to enhance DOS command.com. 
Licensed from JP Software's 4DOS, NDOS is included with Norton Utilities 5.0 
and above. Norton Utilities 8.0 has a NDOS version of 7.0. I do not find NDOS 
useful at first, but as I add more Hard Disk Drives, more directories are 
added and lesser choice for the directory names. I started to load NDOS as a 
command processor because of its capability to add comments for files and 
directories, so that searching of a file make easier.

Number of NDOS Shell
possible values:1 to possible max. shell level
Displayed only when NDOS detected. It displays the number of NDOS shell 
running. Usually 1 or 2 shell is sufficient for proper execution. You can 
free memory by reducing the number of NDOS shell.

Date
Display the current date in Month-Day-Year format.

Time
Display the current time in Hours:Minutes:Seconds format. Note the time is 
in 24 hour format.

CD-ROM drives
possible values: 0 to number of possible drives.
It shows the number of CD-ROM drives you have installed in your system. I 
added this feature because CD-ROM is becoming very popular.

MSCDEX version
possible value: Absent, XX.YY
XX = 2 to 99
YY = 0 to 99
This display the version of your MSCDEX (Microsoft CD Extension) driver. 
Almost all multimedia program need this driver to properly make used of the 
CD-ROM devices. Games and CD Audio player also look for MSCDEX presence. IBM 
OS/2 2.10 and OS/2 Warp emulates MSCDEX as version 2.21. Windows 95 included 
MSCDEX version is 2.51.

CD-ROM Letters
possible value: D: to Z:
Only called when program detected CD-ROM drives. It displays the drive letter 
assigned to the CD-ROM drives. If you have more than 1 CD-ROM drives, all the 
drive letters will also be displayed in the next line. Note that multi-CD 
changer CD-ROM drive is a single physical unit.

DOS Verify
possible value: On, Off
This tell you whether your DOS Verify flag in on or off. On means the system 
will do files comparison during files copy to ensure that both the files are 
identical. Off means no verification of files during files copies. I strongly 
recommend this flag be turnred on (although files copies may appear slower). 
To turn on, simple type "Verify on", or "Verify off" to turn off on the C:\> 
command line. Verify is off in default.


DOS Break
possible value: On, Off
This tell you whether your DOS Break flag is on or off. On mean the user is 
able to stop a program currently in process using Ctrl-Break or Ctrl-C keys. 
Off means the system will only check for the Ctrl-Break and Ctrl-C keys 
during system input/output. Break is off by default.

Known problems:

Under Microsoft Windows windowed DOS Session (if you dare to try running 
under Windows), the base memroy may not be accurate. Expected because SYSInfo 
is not compatible with Windows.

Some Super I/O Enhanced IDE card's driver may emulates 3 COM ports and 2 LPT 
ports, which may cause inaccurate physical count of these ports. 

This shall conclude for SYSInfo readme file. If you find any mistakes, 
inaccurate information or any errors, please write to me. 

Reference materials for SYSInfo: 
PC Interrupts by Ralf Brown and Jim Kyle, Addison Wesley Publishing Company, 
Inc.
Borland C++ Developer's Bible by Peterson, Waite Group Press.
Guide to C Programming by Jack Purdum, Ph.D., Ziff-Davis Press.
The Norton Utilities 8.0 NDOS reference manual, Symantec Corp.


												 
CMOSInfo Module

Overview

The CMOSInfo module was written to display the CMOS register contents. CMOS 
stands for Complimentary Metal Oxide Semiconductor, and it is a kind of 
memory chip that requires very little current (in terms of m-amperes). Used 
for storing system peripherals information for IBM AT and above, and a 
lithium battery was used to keep the information on the chip intact.

This module was distributed as Freeware, please gave to someone who need 
them. Written in Borland C++ 3.10 plus inline assembly language, it can run 
under DOS, Windows and of course OS/2 DOS session. Note that running under 
Windows may (have not discover any problem so far) give inaccurate results.

Central Point Software PCTools and Symantec Norton Utilities has CMOS 
reporting module that is integrated into their system information program. 
You can countercheck with the results in these program if you have any of 
them.

Below is a brief description of the terms used in the program:

Base Memory
possible values: 256 KB, 512 KB, 640KB
This is the base memory as implemented by your motherboard hardware logic. 
The 256K and 512 KB motherboards are almost extinct. DOS currently cannot 
access more than 640KB as base memory.

Extended Memory
possible values: 384 KB to (Max. memory minus 1024KB)
This is the amount of memory above the first megabyte of memory. If you have 
8MB of RAM, then your extended memory should be (8192-1024) = 7168 KB. Note: 
1MB = 1 * 1024 * 1024 bytes. For most systems, if you have more than 16MB of 
RAM, this will only shows 15360KB (15MB).


Memory Configuration
possible values: valid or invalid
This field will inform you of any mismatching of memory configuration. When 
RAMs are added to the system, the CMOS must be updated to reflect the new 
size of the memory. If that was not done, this will give invalid. If this 
field is invalid, make sure the amount of physical memory matches the value 
in the CMOS register.



Battery Power
possible values: OK, Not OK
OK means that the CMOS battery is operational. If Not OK, your CMOS will 
lost all contends and you will see the "CMOS Checksum Error" displayed. The 
battery should last about 3 years. It is good to open up the system casing 
and check on the battery periodically to make sure the battery is not 
leaking, the acid can corrupt your motherboard.

CMOS Checksum
possible values: OK, Not OK
OK means that your CMOS Checksum is valid, Not OK means you have to check 
the CMOS setting and make sure all information are entered correctly. Get 
someone who is familiar with your system to do it. (Not necessary a 
technician.)

System Configuration
possible values: OK, Not OK
OK means that your CMOS information are entered correctly. Not OK means that 
some  invalid information is entered and was detected by the CMOS 
controlling routines.

Hard Disk Controller 
possible values: OK, Not OK
OK means that your hard disk controller (either a separate card or build on 
the motherboard) and the ondisk controller (on IDE and EIDE drives) are 
functioning. Not OK means that something wrong is detected on your 
controller. If you have 2 or more hard disks, make sure the drives can 
coexist. A good way is to make the newer drive as the Master disk.

Math Coprocessor
possible values: Installed, Not Installed
If a Math Coprocessor (also known as FPU - Floating Point Unit or CoPro was 
installed, the value should be Installed. Not Installed otherwise. Intel 486, 
486DX, 486DX2, 486DX4, 487SX, all 486 Overdrives, P5 and all its Overdrives 
and P6 or above, does contained a build-in Coprocessor. 486SX and below 
requires a separate Coprocessor.

Video Mode
possible values: CGA, EGA or VGA
This field shows the video monitor attached to the system. Note that XGA, 
SuperVGA and other advanced display also belongs to EGA or VGA values.

Floppy Drive (A:) Type:
Floppy Drive (B:) Type:
possible values: 360 KB 5.25", 720 KB 3.5", 1.20 MB 5.25", 1.44 MB 3.5", 
2.88MB 3.5" Floppy Drive is used to boot system if your hard disk fails. 
Always put the highest capacity drive as A: because many installation 
diskettes are of high capacity, and OS/2 Warp came with a 1.44 MB 3.5" 
drive as the installation disk. Compaq and 3M has produced a new type of 
floppy system called the LS-120, capacity is 120 MB. I do not know what 
the drive type here.

Harddisk Drive (C:)
Harddisk Drive (D:)
possible values: 1 to 47 (AMIBIOS), 1 to 49 (Phoenix BIOS and other BIOS)
Note: The drives shown here is the physical unit (not logical). If you 
partitioned your single harddisk into many logical disks, you will only see 
it as C:. Some BIOS and disk controllers can support more than two drives, 
in that case, this program stills show the first 2 drives only. This shows 
the CMOS type, depending on your BIOS manufacturer, the types varied from 1 
to 49. For Compaq machines using Compaq BIOS, the hard disk may not be 
detected because Compaq BIOS does not use the standard location that most 
BIOS manufacturer uses. For Compaq machines, please use the Compaq's 
Diagnostics program (press F10 when you see the block cursor moved to the 
upper right corner of the screen upon booting up) for accurate result.

CMOS Checksum
no possible values, varied depending on your CMOS checksum byte in 
Hexadecimal notation. This value will change every time you chage some 
values in the CMOS information table. It's a good practice to always take 
note of this value so that you know something is changed in the CMOS when 
the value changes.

Current Date and Current Time
Display the current date and time. Note that this is not from the CMOS clock 
but from DOS.

Limitations
The program has the following limitations, and may be included with later 
releases:

	Cannot edit CMOS data,  
	Cannot distinguish between different BIOS manufacturer,
	Cannot display all contents of the CMOS register,
	Cannot show drive type table from your ROMBIOS,
	Cannot detect whether a CMOS  memory is present (I assume it is there).

Thank you for reading, I would like to know if you have discovered any bugs, 
or any suggestion you want to give, you can contact me via mail or postcard 
to:

Hong Chin Siong
19 Marsiling Lane
#03-295
Singapore 730019
Republic of Singapore

Tel: 65-3684984
email: h3684984@singnet.com.sg
homepage: www.singnet.com.sg/~h3684984

If you want to know more about the CMOS register, you can refer to the PC 
Magazine, September 13 issue 1994 vol. 13 no. 15 by Ziff-Davis Publishing 
Company.


Machine configuration where this program is written:
China clone motherboard using OPTi895 chipset, AMI WINBIOS 12/15/93, 16MB 
72pins, Intel 80486DX2-66MHz. ATI VGAWONDER XL24 SVGA card, SB16, BusLogic 
caching disk controller with 4MB cache, Creative (Panasonic) CR-563 CD-ROM 
drive, Aztech FM Radio card.


Warning:
Although I have taken many precaution steps in preparing this program, it 
may be incompatible with your system. Note that for machines using an Intel 
80186 and below, there is no CMOS memory and the program either displays 
garbage or hang. Once again, this program was distributed as a FREEWARE to 
the public. Distributor can only charge you on media costs, connection cost 
or other services. And please do not modify the program in any ways and 
assume you wrote the program, a lot of time and effort has been put into 
this program. You will not disassemble, reversed engineered or otherwise 
distribute modified copies. 


Legal stuffs:

All trademarks/registered trademarks belongs to the respective companies.

That is all.

