Article View: comp.os.ms-windows.programmer.misc
Article #2285Re: Memory I/O operation in windows. How?
From: John A. Slagel
Date: Sat, 23 Jan 1993 16:24
Date: Sat, 23 Jan 1993 16:24
27 lines
1435 bytes
1435 bytes
To access the memory at segment D000, you need to use a predefined
selecter. Here's how to clear the segement located at D000.
Once you make the MyMemory pointer, you can just access it like
any other array.
#include "windows.h"
extern WORD PASCAL __D000H;
#define MY_SEGMENT (&__D000H)
main()
{
long i;
BYTE FAR * MyMemory;
MyMemory = (BYTE FAR *)MAKELONG( 0, MY_SEGMENT );
for (i=0; i<0xFFFF; i++ ) {
MyMemory[i] = 0;
}
}
--
-----------------------------------------------------------------------------
John A. Slagel "My old man used to tell me, before he left this
j-slagel1@uiuc.edu shitty world, never chase buses or women- you
(217) 337-7930 always get left behind." -The Marlboro Man
Technical Details
Message-ID:
<C1BEwK.9zF@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876References:
<C132Cs.Cpp@newsserver.technet.sg> <1993Jan22.181056.26438@ibr.cs.tu-bs.de>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876 From: jas37876@uxa.cso.uiuc.edu (John A. Slagel) Subject: Re: Memory I/O operation in windows. How? References: <C132Cs.Cpp@newsserver.technet.sg> <1993Jan22.181056.26438@ibr.cs.tu-bs.de> Message-ID: <C1BEwK.9zF@news.cso.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: University of Illinois at Urbana Date: Sat, 23 Jan 1993 16:24:19 GMT Lines: 27