home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!rz.uni-karlsruhe.de!stepsun.uni-kl.de!sun.rhrk.uni-kl.de!kirk!baum
- From: baum@kirk.es.go.dlr.de (Peter Baumann)
- Subject: SUMMARY: accessing real mode memory
- Message-ID: <1992Nov11.095107.6433@rhrk.uni-kl.de>
- Sender: baum@kirk (Peter Baumann)
- Organization: University of Kaiserslautern, Germany
- Date: Wed, 11 Nov 1992 09:51:07 GMT
- Lines: 28
-
- Hi!
-
- I originally posted a question on accessing real mode memory (the first MB)
- directly. This is needed to read/write to memory located on add on boards
- as frame grabbers grafics cards, etc. The solution is relatively simple and
- was supplied to me first by nar@math.wayne.edu (Mark Narduzzi) and then by
- brad@huey.jpl.nasa.gov for use with Borland C++ 3.1.
-
- The Windows kernel supplies selectors for 64KB size memory pages, which are
- called __A000H, __B000H, ... These are used in the following manner to access
- memory D0000-DFFFF:
-
- extern WORD _D000H;
- LPBYTE fp = MAKELONG(0, &_D000H);
-
- (C prepends an underscore to all variables so only use one underscore in your
- source.)
-
- Thanks a lot for the fast turnaround (I posted on Monday at 1.00AM and Mark
- had answered by 9.00 AM).
-
- ciao, Peter
-
- --
- DDD L RRR | Peter Baumann
- D D L R R | Abt. SM-ES, DLR, Bunsenstr. 10, W-3400 Goettingen, FRG
- D D L RRR | Tel. (0551) 709-2190 FAX: (0551) 709-2101
- DDD LLLL R R | internet: baum@kirk.es.go.dlr.de
-