Memory testing for DOS (over 1 MB)

10 views
Skip to first unread message

Jens Bengtsson

unread,
Feb 26, 1997, 3:00:00 AM2/26/97
to

Hi All,

How do I preform memory testing in DOS (Assembler or C), and when I have
over 1 MB of memory

thanks,

/Jens B

Willow Schlanger

unread,
Mar 2, 1997, 3:00:00 AM3/2/97
to

Jens Bengtsson <jens.be...@eu.biacore.com> wrote in article
<01bc23fc$1c31fca0$2eefebc1@pcbeje>...

> How do I preform memory testing in DOS (Assembler or C), and when I have
> over 1 MB of memory

Enable the A20 gate, enter 32-bit protected mode, then write 1234h (or
whatever you want) to 2MB, then read it; if it changed successfully then
keep going & stop where it didn't read. Then turn the CACHE bit 20 of the
CR0 back on; and you have the no. of MB available on the present system
(accurite to a single MB.) To be more accurite try smaller blocks.

I use this for my OS and it works quite nicely. Hope I could help...

/Willow

Reply all
Reply to author
Forward
0 new messages