1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Plz Help on writing directly into vdu memory in c

Discussion in 'C' started by tiger, Jun 8, 2008.

  1. tiger

    tiger New Member

    Joined:
    Jun 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi friends!
    i wanna write directly to vdu memory using c language.the code is here
    .............code begin........
    #include <stdio.h>
    #include <conio.h>
    int main(void)
    {
    int i;
    char far *vidmem=0xB8000000;
    for(i=0;i<=3999; i=i+2)
    *(vidmem+i)='A';
    return 0;
    }

    ..........code end...........

    the compiler i use is Turbo C version 3.0. i got the following error when i try to compile
    the code.

    cannot convert unsigned long to char far*

    please help me , what is the error or the reason why it does not work.
    moreover please suggest a good C Book for me i m a college computer science student.
    thanx.
     
  2. tiger

    tiger New Member

    Joined:
    Jun 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    hey people u r all too lazy to answer my post which was posted a month ago.........
    i m very dissapointed with forum.................
     
  3. owatheowais

    owatheowais New Member

    Joined:
    Jun 28, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    #include <stdio.h>
    #include <conio.h>
    int main(void)
    {
    int i;
    char far*video;
    video=(char far*)0xB8000000L;
    for(i=0;i<=3999; i=i+2)
    {
    *(video+i)='A';
    *(video+i+1)=65;
    }

    Sorry late reply, as I m also new user of c programming don't know such knowlegde about vdu and graphic coding in c but it will help you!
     

Share This Page