home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
322_01
/
ramtest2.doc
< prev
next >
Wrap
Text File
|
1990-08-06
|
3KB
|
77 lines
RAM TEST ROUTINES FOR DETECTING STUCK-AT FAULTS
===============================================
by
Chaiyos Ruengsakulrach
and
Dean Lance Smith
Department of Electrical Engineering
Memphis State University
Memphis, TN 38152
(901)-678-3253
(901)-678-2175
The RAM test routines were programmed using the MATS and
MATS+ algorithms. The routines were compiled with a Turbo C
compiler (Version 2.01) that runs on MS-DOS on an IBM PC/XT or
compatible computer.
The following Turbo C functions were called by the program.
- Function CLRSCR() in the library conio.h clears the
screen.
- Function GOTOXY(x, y) in the library conio.h puts the
cursor at column x, row y.
- Function WHEREX() in the library conio.h gives horizontal
cursor position within a window.
- Function WHEREY() in the library conio.h gives vertical
cursor position within a window.
- Function MK_FP(segment, offset) in the library dos.h
creates a far pointer from a segment register value and the
offset or pointer that works with the segment value.
Huge pointers were used in the routines. Huge pointers are
32 bits long and contain both a segment address and an offset.
The segment address ranges from 0000 to FFFF in hexadecimal. The
offset automatically wraps around every 16 values between 0000
and 000F in hexadecimal since a segment can start every 16 (10 in
hexadecimal) bytes.
Functions mats() and matsp() in the software implement the
MATS and MATS+ algorithms. These two functions were written to
be as general purpose as possible. The routines are well
documented to help the reader understand the routines. The
function that gets memory locations from the user accepts only
hexadecimal characters.
The RAM test program begins by displaying a menu and
prompting the user to select the algorithm (MATS or MATS+) to
test RAM. Then the software requests the user to supply the
starting and ending addresses of the RAM to be tested. The user
must type both the segment and offset of each address in
hexadecimal. The software verifies that the starting address
equals or is less than the ending address. After getting both a
valid starting and ending address, the software tests memory
using the algorithm selected by the user. The software displays
the address and the contents of any faults detected. The program
also reports the total number of stuck-at faults that are
detected. If no faults are detected, the software displays a no-
fault message.
USER CAUTION
============
Before testing memory, a user should be aware of some
special memory locations in an IBM PC/XT or compatible computer.
Some memory areas are used for an interrupt vector table,
interface routines, the operating system, the test software,
video RAM, ROM, etc. Some of these areas, such as the RAM
occupied by MS-DOS, must be left undisturbed to insure the test
program operates properly. Therefore, a user has to make sure
that the memory region to be tested does not cover the RAM
occupied by MS-DOS.