Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Write into Video Memory ? Far Pointer

Write into Video Memory ? Far Pointer

Scheduled Pinned Locked Moved C / C++ / MFC
questionperformance
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RadioOpa
    wrote on last edited by
    #1

    In the 16Bit days you could easily access the video ram B800:0000 with far pointers. "Far" is now obsolete since all pointers are 32Bit ones. How can I access B800:0000 in a console application now ? In 16Bit days this worked: unsigned far int Videospeicher = 0xB8000000; unsigned far int *pVideoPointer; pVideoPointer = ( unsigned far int ) Videospeicher; for( int i = 0; i < 20; i++) { *pVideoPointer++ = 0x4E41; } -- modified at 4:04 Friday 11th November, 2005

    S D 2 Replies Last reply
    0
    • R RadioOpa

      In the 16Bit days you could easily access the video ram B800:0000 with far pointers. "Far" is now obsolete since all pointers are 32Bit ones. How can I access B800:0000 in a console application now ? In 16Bit days this worked: unsigned far int Videospeicher = 0xB8000000; unsigned far int *pVideoPointer; pVideoPointer = ( unsigned far int ) Videospeicher; for( int i = 0; i < 20; i++) { *pVideoPointer++ = 0x4E41; } -- modified at 4:04 Friday 11th November, 2005

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      AFAIK, you can't. Windows is an OS with Virtual Memory support, which means that 0xB8000000 doesn't represent the physical memory at that address. What's more, if you try to read/write to that memory location, you'll get Access Violation errors because Windows detects that you're trying to use memory which has not been mapped. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      1 Reply Last reply
      0
      • R RadioOpa

        In the 16Bit days you could easily access the video ram B800:0000 with far pointers. "Far" is now obsolete since all pointers are 32Bit ones. How can I access B800:0000 in a console application now ? In 16Bit days this worked: unsigned far int Videospeicher = 0xB8000000; unsigned far int *pVideoPointer; pVideoPointer = ( unsigned far int ) Videospeicher; for( int i = 0; i < 20; i++) { *pVideoPointer++ = 0x4E41; } -- modified at 4:04 Friday 11th November, 2005

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Kamann wrote:

        In the 16Bit days you could easily access the video ram B800:0000 with far pointers.

        One of my favorite parts of DOS programming was the ability to write directly to video memory. :-D Have you considered using the console API for this?


        "Take only what you need and leave the land as you found it." - Native American Proverb

        B 1 Reply Last reply
        0
        • D David Crow

          Kamann wrote:

          In the 16Bit days you could easily access the video ram B800:0000 with far pointers.

          One of my favorite parts of DOS programming was the ability to write directly to video memory. :-D Have you considered using the console API for this?


          "Take only what you need and leave the land as you found it." - Native American Proverb

          B Offline
          B Offline
          basementman
          wrote on last edited by
          #4

          I wrote an entire UI library using direct video memory access. Exploding windows, SaveScreen/RestoreScreen, TextOut.. etc. Piece of cake and was it FAST!  onwards and upwards...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups