Daqarta for DOS Contents
The SYSTEST Utility:This program reports CPU type and speed, and measures memory, video, and ISA bus access timing. Shows DOS program start address, memory end, BIOS date, various CPU flags, Advanced Power Management status if present, and SMARTDRV version and status.
Here is a typical output example:
SYSTEST version 2.01 Copyright (C) 1999 by Interstellar Research - http://www.daqarta.com DOS End Prog CS IRQs Enabled CPU Flags CPU Status BIOS 9FC0h 0D33h .EDC..9..6...210 0000:7046h 0010h 04/19/90 Video: VGA, mode 03h. Mode 10h byte read: 498, write: 210 nsec CPU: 50.0 MHz 486. Genuine Intel Original OEM 486, Model 3 (DX2), Step 5. Instruction times (nsec): LPT 1 INT MASK DMA TIMER STRINGw WORD Read: 1408 1408 1408 1408 99 20 (Base) Write: 1495 1496 1496 1495 99 19 180 ADVANCED POWER MANAGEMENT --- APM version 01.01 supports: 16-bit 32-bit CPU Idle ------- BIOS -------- YES YES NO DISABLED DISENGAGED SMARTDRV version 05.01 installed. Only READ Cache enabled for Drive C: Use SYSTEST ? for more information and options.
What it means:DOS End is the start of memory segment just past that which normal real-mode DOS can access. This is limited to A000h, the start of video memory, but may often (as in the example above) be a little less.
Prog CS is the start of the actual SYSTEST code segment, so the amount of DOS memory available for programs is the difference between these two. In this example, that would be 9FC0h - 0D33h = 928Dh paragraphs (at 16 bytes each), or 928D0h bytes total. Converting from hexadecimal, that's 600272 bytes.
IRQs Enabled shows the number of any IRQ (Interrupt ReQuest) that is presently enabled. For a compact display, those above 9 are shown in hexadecimal, so in this example IRQs 14, 13, 12, 9, 6, 2, 1, and 0 are enabled. Note that these are only those that are currently enabled, not necessarily in active use. Also note that other IRQs may be reserved for specific uses, but will not be enabled until needed.
CPU Flags are the contents of the EFLAGS:FLAGS registers, expressed as a hexadecimal value for compactness.
Bits 31-19 (Reserved on 486 CPU) 18 Alignment Check 17 Virtual 8086 Mode 16 Debug Resume 15 (Reserved) 14 Nested Task 13-12 I/O Privilege Level 11 Overflow Flag 10 Direction Flag (String operations) 9 Interrupt Flag 8 Trap Flag 7 Sign Flag 6 Zero Flag 5 (Reserved) 4 Auxiliary Flag 3 (Reserved) 2 Parity Flag 1 (Reserved) 0 Carry Flag
CPU Status is the contents of the Machine Status Word (MSW) on 286 and higher CPUs, expressed in hexadecimal.
Bit 31 Paging (386+) 30 Cache Disable (486+) 29 Not Write-through (486+) 28-19 (Reserved) 18 Alignment Mask (486+) 17 (Reserved) 16 Write Protect (486+) 15-6 (Reserved) 5 Numeric Error (486+) 4 Extension Type 3 Task Switched 2 Emulate Processor Extension 1 Monitor Processor Extension 0 Protected Mode Enable
BIOS is the BIOS release date, found at F000:FFF5h in all systems. There is no standard location for the BIOS manufacturer, though it usually appears in a copyright message somewhere in the region right after F000:0000. You can see that via the DEBUG D (Dump) command:
DEBUG D F000:0000 (Dump memory at this location) ... (Hit D additional times to see more) Q (Quit DEBUG)
Video: shows the type of video adapter:
MDA Monochrome Display Adapter HGC Hercules Graphics Card CGA Color Graphic Adapter EGA Enhanced Graphics Adapter VGA Video Graphics ArrayThe VGA label is also applied to anything higher, such as SVGA or XGA, as well as the MCGA (Multi-Color Graphics Array) built into PS/2 systems.
For VGA systems, many older cards had only 8-bit ISA connectors,
and even some early cards with 16-bit connectors were only
capable of 8-bit video accesses. These cards will show as
The current video mode (at the DOS command line prompt) is typically 03h. MDA or HGC cards will be 07h.
The times to read and write a byte of data from/to the screen are shown for 640x350 graphics mode 10h on EGA cards and above, or else normal text mode for other cards. (Mode 10h is used by Daqarta for speed and widest compatibility with graphics cards.) These times actually include the time to advance a pointer to the next screen byte location, since they use repeated string operations (LODSB and STOSB).
CPU speed is shown to the nearest 0.1 MHz, but note that this is a tricky measurement that may vary a few MHz between attempts.
x86 CPU family should be correct for all Intel CPUs,
including the rare 8086 (used on some PS/2s) and the even rarer
80186 and 80188 (untested... may have never actually been used
in any PC). The old NEC V20 is properly detected, as well as
any modern chip that supports the CPUID instruction.
The 386SX and DX can only be distinguished in real-mode DOS,
not in protected mode. You will need to either boot DOS
directly, or use the Windows 9x 'Restart in MS-DOS Mode'
option from the Shut Down menu. If SYSTEST detects a 386
in protected mode, it reports:
For CPUs that do support the CPUID instruction, the next line shows the results. SYSTEST shows the Model and Step numbers, and translates those that it understands...in the above example, it recognized a (DX2).
Instruction times are shown for various operations. If
the system is running in protected mode, this header will say
Protected mode "protects" one application from another by strictly limiting I/O access, and must consult a table of allowable ports on each attempt. It may decide to emulate the operation instead of actually doing what is requested. The system TIMER, in particular, may be emulated to avoid disturbing the time-of-day and resource allocation operations.
To make these timing measurements, SYSTEST first measures the time to execute a base loop containing only 2 NOP instructions, then times each test loop that also includes the instruction to be measured. The difference between base and test times is then converted to nsecs per single loop pass and reported. The (Base) time is also shown at the far right, for reference.
Both Read: and Write: times are measured for each type of operation. Note that for the I/O ports (LPT 1, INT MASK, DMA, and TIMER) these are all BYTE operations, whereas the other two are WORDs.
For the LPT 1 measurements, SYSTEST first establishes that a valid port is present. If not, it shows values of 0. The Read value is for the Status port and the Write value is for the Data port, as in normal usage. For example, if the LPT 1 Data port is at 0378h, the Status address would be 0379h.
The INT MASK is at 21h, used to enable/disable IRQs 0-7. The value obtained by reading this port is the value that is used for the write test, so that nothing is changed.
DMA timing is not for an actual DMA transfer operation, since SYSTEST must be able to work on any system without actually knowing what hardware is present or safe to use. The Read value is the time to read the DMA channel 1 pointer, which is used by applications (like Daqarta) that need to monitor DMA transfer progress between DMA-generated interrupts.
The DMA Write value is the time to set the DMA byte-reset latch. This port (0Ch) is normally used before sending word data to the DMA controller, which can only accept one byte at a time. Writing anything to this port just resets the controller to expect the low byte first, the normal order.
The TIMER Read value is the time to read the current system timer 0 (time-of-day) at port 40h. Since this timer is normally set to count down 16-bit values, a read must be done in two single-byte steps. But since the timer is still running, the count value may change between reading the first and second byte. That's not important here, since SYSTEST ignores this timer value anyway. (It uses timer 2 for instruction timing.)
But for an accurate reading, the timer provides an instruction to latch the current count value, so that the separate reads can be done at leisure while the timer continues to count. The timer 0 latch command is what is timed for the Write value shown here... even though the latched value is never read back.
In normal use, a program would give a latch command followed by two read commands, along with the necessary register setups and shuffling to combine the two bytes into a whole word.
STRINGw shows the times to read / write one word of data from / to memory as part of a repeated string, using REP LODSW for the Read and REP STOSW for the Write. A string command uses a separate register to point to the start of the memory block, then advances that pointer after each word is read or written.
The REP STOSW command is commonly used to fill a block of memory with the same value (from the AX register), such as to clear an array. If the pointer register is set for the video memory area, this same command can be used to clear or color a portion of the display image, though the byte-sized STOSB version is often more useful. (It was used for the earlier video write measurement.)
REP LODSW, on the other hand, is completely nonsensical in normal use, since it repeatedly reads a word into the AX register and then ovrewrites it with subsequent words. But since the reported times are for each word, not the entire string, it's a meaningful measure of the way a single LODSW instruction is normally used, such as in processing values from an array.
WORD shows the time to perform a simple read or write to a memory location, using MOV AX,[SI] for the read, and MOV [SI],AX for the write.
SYSTEST ?for more information and options. If you do that, you will see:
o Instruction times for I/O ports are for BYTE reads and writes. o INT MASK is at 21h. DMA reads channel 1 pointer, writes byte-reset. o TIMER reads timer 0 (time-of-day), writes timer 0 latch command. o Protected Mode (Windows or EMM386) may result in MUCH longer times. o STRINGw times are for LODSW and STOSW aligned on DWORD boundary. o The (Base) time is for a DWORD-aligned loop containing only 2 NOPs. o Test times are for 2 NOPs plus the test instruction, less (Base) time. ADVANCED USERS ONLY: Reads and writes of LPT 1 Status and Data ports may be replaced by specifying another port address (hex) on the command line, as in: SYSTEST 310 Specify WORD reads and writes at that address via: SYSTEST w310 The write test of the specified port uses the data read from it. Output may be redirected to a file with: SYSTEST > filename.ext.
The first part of this is just a summary of the intruction timing, as previously discussed.
The ADVANCED USERS ONLY section is important: It allows you to totally screw up your system if you don't know what you are doing. By supplying a port address, in hexadecimal only, you can tell SYSTEST to skip the LPT 1 tests and use that port instead. The specified port will be read and the data saved, then the port will be read repeatedly to get the Read timing. The data is then written repeatedly to get the Write timing.
NOTE that just because SYSTEST writes back the same data as read does NOT mean that nothing is changed: Some devices like the DMA and video controllers use a 2-step sequence to write word data as separate bytes. Many devices have completely different meanings for the data that is read and written at the same address, such as Status when reading and Command when writing. So DO NOT mess around here if you don't know what you're doing!
The port address you enter will replace the 'LPT 1' header over the output Read and Write times, and will be shown with a 'b.' prefix, as in 'b.0310h'. The prefix indicates a 'byte' data size, which is typical for most I/O ports on a system.
By putting a 'w' before the specified address, you can tell SYSTEST to use word reads and writes at that address. This is useful for testing the speed of devices on the 16-bit ISA bus that support word transfers (not all do). Note that your system may add different numbers of wait states for 8-bit and 16-bit devices, so this allows you to see that.
If you use the 'w' with an 8-bit port, the net effect is simply to perform back-to-back operations on the specified address and the one after it. The data read from each port will be written back to the proper port during the write test.
(Note: SYSTEST Version 2.00 still showed the 'b.' prefix in the header when 'w' was specified, even though it did indeed use word reads and writes. The header is properly updated in this Version 2.01.)
Finally, you can use standard DOS redirection to send the output of SYSTEST to a file. This is useful to gather information from different systems for later comparisons. Note that redirection will overwrite any file of the specified name without prompting you, so use caution when selecting a name.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research