Thread: Control non-dos programs

  1. #1
    Unregistered
    Guest

    Control non-dos programs

    Can any body know how to control the memory region outside the dos 640 memory..... i suppose that this can't be done ...... if you are saying that we can able to access the outside windows memory .... then one more question?

    --- HOW you do the same in windows nt or 2k or xp

    by sridhar.r of au,chennai,india

  2. #2
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002
    Posts
    192

    Thumbs up

    Though I've never worked with them, I understand that FAR and HUGE pointers would do the work for u.
    For example to access the VIDEO-RAM memory you declare a far pointer as...

    char far *vdumem=(char far *)0xB8000000;

    So, work on FAR and HUGE pointers to solve ur problems.

    Regards,
    Sriharsha
    Help everyone you can

  3. #3
    Sridhar
    Guest

    Cool

    Can you send me a sample program Sriharsha

  4. #4
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002
    Posts
    192

    Smile

    This works with far pointers...(DOS MODE).

    [code]
    main()
    {
    char far *vm=(char far *)0xB8000000; /* this is the starting address of the video memory of an CGA or a higher adapter that lies outside the 640k Dos segment */
    int i;
    for(i=0;i<=3999;i+=2)
    *(vm+i)=2;
    }

    *Frankly, I've never used HUGE pointers.

    - Harsha.
    Help everyone you can

  5. #5
    Sridhar
    Guest

    Unhappy

    where can get a clear idea of these (exploring......_) pointer stuffs

    help me!

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    For pointers, read
    http://pw2.netcom.com/~tjensen/ptr/cpoint.htm

    Best to use a modern OS - like the ones you suggest, or any unix/linux variant. Then you dont have to worry about small memory limitations, and all those near/far/huge qualifiers on pointer types.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Direct Connect between XP and DOS
    By lightatdawn in forum Tech Board
    Replies: 0
    Last Post: 01-22-2004, 11:22 PM
  2. Replies: 8
    Last Post: 07-20-2002, 09:23 AM
  3. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  4. Updating Static Control Color Real-Time :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-29-2002, 03:09 PM
  5. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 01:42 PM