home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3362 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.5 KB  |  39 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. 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
  3. From: baum@kirk.es.go.dlr.de (Peter Baumann)
  4. Subject: SUMMARY: accessing real mode memory
  5. Message-ID: <1992Nov11.095107.6433@rhrk.uni-kl.de>
  6. Sender: baum@kirk (Peter Baumann)
  7. Organization: University of Kaiserslautern, Germany
  8. Date: Wed, 11 Nov 1992 09:51:07 GMT
  9. Lines: 28
  10.  
  11. Hi!
  12.  
  13. I originally posted a question on accessing real mode memory (the first MB)
  14. directly. This is needed to read/write to memory located on add on boards
  15. as frame grabbers grafics cards, etc. The solution is relatively simple and
  16. was supplied to me first by nar@math.wayne.edu (Mark Narduzzi) and then by
  17. brad@huey.jpl.nasa.gov for use with Borland C++ 3.1. 
  18.  
  19. The Windows kernel supplies selectors for 64KB size memory pages, which are
  20. called __A000H, __B000H, ... These are used in the following manner to access
  21. memory D0000-DFFFF:
  22.  
  23. extern WORD _D000H;
  24. LPBYTE fp = MAKELONG(0, &_D000H);
  25.  
  26. (C prepends an underscore to all variables so only use one underscore in your
  27. source.)
  28.  
  29. Thanks a lot for the fast turnaround (I posted on Monday at 1.00AM and Mark
  30. had answered by 9.00 AM).
  31.  
  32. ciao, Peter
  33.  
  34. -- 
  35. DDD   L    RRR   |  Peter Baumann
  36. D  D  L    R  R  |  Abt. SM-ES, DLR, Bunsenstr. 10, W-3400 Goettingen, FRG
  37. D  D  L    RRR   |  Tel. (0551) 709-2190 FAX: (0551) 709-2101
  38. DDD   LLLL R  R  |  internet: baum@kirk.es.go.dlr.de
  39.