direct access of video buffer.???

This is a discussion on direct access of video buffer.??? within the C++ Programming forums, part of the General Programming Boards category; hey there.... i am using this code to access the "monochrome screen address" directly... Code: int main() { char* screen; ...

  1. #1
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279

    direct access of video buffer.???

    hey there....

    i am using this code to access the "monochrome screen address" directly...


    Code:
    int main()
    
    {  
      char* screen;
      char ch;
    
       screen = 0xb0000000;   // this is where an error occurs...
    
       ch = 'a';
      
       *screen = ch;                 // simply supposed to print   (a) to the   
                                     //screen
    
       return 0;
    
    }

    the problem is in assigning directly a video buffer to (screen) variable...???

    any suggestions???

    matheo917

  2. #2
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266
    as you could most likly guess, i don't know the answer. but my attention goes to the pointer. can you do that?

  3. #3
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    yes you can, i just think it doesn't let me assign the value in hexadecimal....

  4. #4
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Is it compile time or run time? If run time, it might be that your OS doesn't let you do it. I am not too sure about the details of Protected Mode so I am not completely sure.

  5. #5
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    it is a compile time error and it states:

    ............NONPORTABLE POINTER CONVERSION....


    hmmmmmm...?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. a library or API providing direct access to a running PE address space
    By renzokuken01 in forum Windows Programming
    Replies: 9
    Last Post: 05-24-2009, 01:40 PM
  2. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 02:27 AM
  3. Replies: 15
    Last Post: 10-31-2005, 07:29 AM
  4. Access Violation Of Memory Buffer WHY??
    By bartybasher in forum Game Programming
    Replies: 20
    Last Post: 08-13-2004, 07:33 AM
  5. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 03:33 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21