Jan 082018
 
Measure memory access times over any range of memory. Helps to find the best part of memory to use for a particular function.
File TIMEM100.ZIP from The Programmer’s Corner in
Category System Diagnostics
Measure memory access times over any range of memory. Helps to find the best part of memory to use for a particular function.
File Name File Size Zip Size Zip Type
TIMEM.100 897 388 deflated
TIMEM.DOC 11731 4422 deflated
TIMEM.EXE 5395 5189 deflated

Download File TIMEM100.ZIP Here

Contents of the TIMEM.DOC file



Trademarked names are the property of the respective owners


(c) Copyright 1991 F.M. de Monasterio
Licensed Material - All rights reserved

TIMEM version 1.00
------------------

1. SUMMARY

TIMEM is a utility to measure memory access times over a range of memory
as small as 1 kb or as large as 1 Mb. It is useful for the selection of
an upper-memory block (UMB) for resident utilities capable of installing
themselves in upper memory (via an XMS manager) and of selecting a lower
limit for the UMB.

-----------------

2. GENERAL INFORMATION

Several types of addressable memory are found in iAPX 80x86 CPUs. In all
DOS-compatible machines, however, the first megabyte (1 Mb = 1,024 kb) of
memory comprises the initial 640 kb of address space used by DOS, and the
remaining 384 kb of address space used by hardware subsystems and by BIOS
routines. The addressable megabyte is referred to as conventional memory
and its 384-kb subspace as upper memory blocks (UMBs) or high-DOS memory.

0 kb 640 kb 1024 kb
DOS UMB




In the IBM AT and compatibles, which can support a physical address space
larger than 1,024 kb, additional memory is located above the initial 1 Mb
of space, up to a physical address space of 16 Mb in i286 and i386SX CPUs
and 4 Gb in i386 CPUs. The additional addressable RAM is called extended
memory and is subdivided into a high memory area, which is the initial 64
kb area immediately above the 1-Mb limit, i.e. from 1,024 kb to 1,088 kb,
and the extended memory blocks (EMBs), located above the physical address
at 1,088 kb.

1Mb 16Mb-4Gb
Extended memory


0 kb


Irrespective of the CPU, DOS runs in an 086-compatible mode known as real
mode. In such a mode, where addressable memory is seen as consisting of a
series of 64-kb segments, memory addresses are made up of two portions: a
16-bit SEGMENT, between 0 and 65,535 (or FFFFh in hexadecimal), and a 16-
bit OFFSET, which is the distance in bytes (between 0 and FFFFh) from the
address to the first byte of the segment.

By changing segment:offset values, up to 1 Mb of memory can be addressed;
given the inherent overlap of such a method of addressing, it is possible
to point to a given locale in memory, such as the beginning of the second
kilobyte of the UMB space (641 kb) by more than one segment:offset value,
e.g. A400:0000h, A000:0400h, 9FFF:0410h, 9400:C400h, etc. This ambiguity
can be resolved by using physical addresses, in which these two parts are
combined to form a 20-bit address by multiplying the segment by 16 and by
adding the offset to it. (The highest possible 20-bit number is 1,024 kb,
which is why this is the maximum space of [086] conventional memory.)

-----------------

3. PROGRAM INFORMATION

TIMEM measures access time to a range of conventional memory blocks, each
of 1 kb length, starting at a user-specified, zero-offset segment between
0 and FFFFh, and ending at higher zero-offset segment either specified by
the user or set automatically by the program.

---------

TIMEM is useful to measure access time in sufficient detail to select the
best UMB base segment in which to install those resident programs capable
of loading themselves into an upper memory block (UMB) via an XMS manager
and of selecting a lower high-memory limit for the UMB. This permits the
avoidance of high-memory areas whose timings might be considered too slow
for a particular resident's task.

Examples of such programs are VIZ.EXE (an accelerator of video text I/O),
BLANKS.EXE (a screen saver) and XDISK.SYS (a resizable LIM/EMS RAM disk).

XMS services are implemented in some 386 memory managers, such as QEMM386
(Quarterdeck) and 386MAX (Qualitas), and the prototype XMS manager HIMEM.
SYS (Microsoft).

---------

Because of intrinsic variations, timings should be repeated several times
to obtain a more representative evaluation. The results represent micro-
seconds per kilobyte (s/kb) for the particular metric used in this test,
and are sent to the video display via DOS. This output can be redirected
to a file or the printer through the DOS redirection command > or >> when
executing the program.

---------

TIMEM uses the microcomputer's timer chip for these measurements. The IBM
PC family uses an 8253 (or 8254) timer chip to tally system clock pulses,
and for DMA memory-refresh operations, and speaker output. Access timing
measurements do not affect the memory contents, but (because of the timer
reprogramming) may introduce small inaccuracies in the system-clock pulse
count maintained by the BIOS and used by DOS. These inaccuracies are not
permanent and disappear when the CPU is rebooted; their occurrence can be
minimized by synchronizing timing loops with the system clock pulses (see
switch S below), although this results in a penalty in speed performance.

TIMEM assumes the system timer is an 8253-compatible chip. If this is not
the case (as in IBM PS/2s), switch P helps to avoid measurement errors in
computers not compatible with the IBM PC hardware standard.

-----------------

4. USAGE
TIMEM [seg1[seg2]] [/switches] [;comments]


seg1 The starting zero-offset segment in 4-digit hexadecimal notation
ranging between 0 and FFFF. Default: Null argument = A000.

seg2 The final zero-offset segment in 4-digit hexadecimal notation of
memory range to be timed. The final segment must be higher than
the initial one. Default: Null argument = (seg1+15 kb), invalid
argument = FFFF.


SWITCHES

The switches are not case sensitive, may be given in any order, and must
be preceded by any ASCII character between space ( ) and slash (/):


/N NonStop listing of access timing data. Use this switch when the
data will be send to a file via DOS redirection commands.

/P Do not assume timer is an 8253-compatible chip (e.g., IBM PS/2).
This switch may introduce a small error when timing a very large
range of memory in a very slow CPU.

/S Synchronize timing loops and the system clock pulses to decrease
the possibility of introducing inaccuracies in the time count of
DOS when timing a large memory range in a slow CPU. (Such small
inaccuracies are temporary and disappear upon rebooting.) Since
the clock pulses only every 55 ms, this switch slows down TIMEM.


COMMENTS

Comments may be added in the command line invoking the program after the
desired switches. The comments, which may be useful in clarifying batch
files, must be preceded by a semicolon (;), and are ignored by TIMEM.

NOTE:
Do not use DOS redirection (<>) and pipe (|) command characters in these
comments since DOS will try to implement the implied redirection or pipe
request.


------------------------------------------------------------------------------

REGISTRATION

These programs and the documentations (the "Software") are the copyrighted
property of FM de Monasterio (the "author"), who provides the Software and
licenses its use. All rights are reserved.

The Software is part of a user-supported, shareware package. If you do not
wish to register the Software package, but would like to use this utility,
please send to the address below a US$5.00 check marked "For Deposit Only"
and payable to "PATIENT CARE FUND, CHILDREN'S HOSPITAL" of Washington, DC.
Users who donate to such a fund may legally keep and use the utility under
the limitations described below.

FM de Monasterio
P.O. Box 219
Cabin John, MD 20818-0219
DISTRIBUTION

You may distribute this Software via magnetic and/or electronic means, but
you are specifically prohibited from:

- Charging fees or asking donations in exchange of or payment
for copies of the Software.
- Distributing this Software with commercial products without
the written permission from the author.
- Distributing this Software via a for-profit organization or
group, either alone or with other Software.

The unauthorized copying, decompiling or disassembling of this Software is
prohibited; any other use of this Software is prohibited without a written
permission in advance from the author.


WARRANTY DISCLAIMER

The author cannot and does not warrant that any function contained in the
programs will meet your requirements, or that the operation will be error
free. The entire risk as to the Software performance or quality, or both,
is solely with the user and not the author. You assume responsibility for
the selection of the program to achieve your intended results and for the
installation, use, and results obtained from the Software.

The author makes no warranty, either implied or expressed, including with-
out limitation any warranty with respect to this Software documented here,
its quality, performance, or fitness for a particular purpose. In no event
shall the author be liable to you for damages, whether direct or indirect,
incidental, special, or consequential arising out the use of or any defect
in the Software, even if the author has been advised of the possibility of
such damages, or for any claim by any other party.

All other warranties of any kind, either express or implied,including but
not limited to the implied warranties of merchantability and fitness for
for as a particular purpose, are expressly excluded.


LIMITATION OF REMEDIES

The author's entire liability, and your exclusive remedy shall be: (1) the
replacement of an original Software diskette not meeting the above Limited
Warranty and which is returned to the author along with proof of purchase,
or (2), if the author is unable to deliver a replacement diskette which is
free of defects, you may terminate the License Agreement by returning this
Software and the corresponding license fee will be returned.

By using the Software, you acknowledge (1) to have read and understood all
parts of this document and (2) to have agreed with and accepted all of its
provisions without any reservation.

--------------------------------------------------------------------------------
[END]


 January 8, 2018  Add comments

Leave a Reply