home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10643 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.8 KB

  1. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!zaphod.mps.ohio-state.edu!caen!nic.umass.edu!risky.ecs.umass.edu!umaecs!nllopis
  2. From: nllopis@ecs.umass.edu
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: Direct video memory access
  5. Message-ID: <19046.2b06539d@ecs.umass.edu>
  6. Date: 15 Nov 92 13:41:49 GMT
  7. References: <2890.2B054487@catpe.alt.za>
  8. Lines: 58
  9.  
  10. For any information on direct memory access, if you are half serious 
  11. about it, I would strongly suggest that you get a copy of the
  12. book "PC&PS/2 VIDEO SYSTEMS" by Richard Wilton, published by
  13. Microsoft Press. 
  14. I had it for a couple years and it has proven to be really 
  15. usefull. It has all the information you need for direct 
  16. graphics programming in all video cards CGA,EGA,VGA,MCGA,Hercules,
  17. etc....
  18. Definetely worth the $27 it costs!
  19.  
  20.  
  21.     Noel Llopis
  22. In article <2890.2B054487@catpe.alt.za>, JWF.Thirion@p2.f118.n7102.z5.fidonet.org (JWF Thirion) writes:
  23. > Hello Andrew!
  24. >  AM> I would like information on accessing video memory directly on any PC.  I
  25. >  AM> need information for any screen type, in particular, HERCULES, CGA, EGA
  26. >  AM> and VGA, for text and graphic modes.
  27. > I don't know if the following is what you want, but here goes  (I don't know if Hercules is correct):
  28. > Display  | Video Segment | Type       | Bits per pixel
  29. > HERCULES : 0B000h        : Text       : ?
  30. >            0B000h        : Graphics   : ?
  31. > CGA      : 0B000h        : Text       : ?
  32. >            0B800h        : Graphics   : 4 bits per pixel
  33. > EGA      : 0B800h        : Text       : ?
  34. >            0A000h        : Graphics   : 1 bit per pixel.  (16 Color Mode)
  35. > VGA      : 0B800h        : Text       : ?
  36. >            0A000h        : Graphics   : 1 bit per pixel.  (16 Color Mode)
  37. >                                         8 bits per pixel.  (256 Color Mode)
  38. > MCGA     : 0B800h        : Text       : ?
  39. >            0A000h        : Graphics   : 8 bits per pixel.  (256 Color Mode)
  40. > To for instance plot a pixel at the first position on the screen in MCGA mode, use the following code:
  41. > MOV AX, 0A000h     ; Video Segment
  42. > MOV ES, AX         ; Place it in Extra Segment.  (Used as destination)
  43. > MOV AL, 01h        ; Color to use.  (Blue in this case)
  44. > MOV CX, 0001h      ; Number of pixels to plot
  45. > MOV DI, 0000h      ; Offset on the screen.  Calculated : DI = (320 * Y) + X.
  46. > REP STOSB          ; Plot all pixels.  (Use STOSB if you just want to plot one)
  47. > I hope this could help.  Leave me a message if you are still having trouble with it and I will write a short example to show you how it is done.
  48. > CU,
  49. > JWF Thirion (Derik)
  50. > --  
  51. > INTERNET: JWF.Thirion@p2.f118.n7102.z5.fidonet.org
  52. > via:  THE CATALYST BBS in Port Elizabeth, South Africa.
  53. >        (catpe.alt.za)   +27-41-34-1122 HST or +27-41-34-2859, V32bis & HST.
  54.