problem going into mode 13h

This is a discussion on problem going into mode 13h within the C++ Programming forums, part of the General Programming Boards category; I'm having a problem going into mode 13h with dev-c++. The program compiles fine but when I execute it a ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    61

    problem going into mode 13h

    I'm having a problem going into mode 13h with dev-c++. The program compiles fine but when I execute it a BSOD pops up and says
    "A fatal exception OD has occurred at 0028:C0002ABC in VxD VMM(01) + 00001ABC. The current application will be terminated. "
    Heres my code
    #include <windows.h>

    int main()
    {
    asm("mov $0x13, %ax");
    asm("int $0x10");

    Sleep(3000);

    asm("mov $0x03, %ax");
    asm("int $0x10");

    return 0;
    }

    can anyone help.
    Last edited by ArseMan; 08-27-2001 at 06:30 PM.

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    47
    You cannot enter mode 13h from WIndows unless you use an API like DirectDraw to enter screenmode 320x200x8. And that's not 13h as most people know it. In order to do what you're really trying to do, you have to use a DOS compiler, like DJGPP (what I use) or Borland (what most people seem to use).

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459

    advice on DJGPP...

    if you're DOS-ing... yes, go with DJGPP... it gives you memory freedom with it's 32-bit extending... ie, calloc (8 * 1024 * 1024) all you want... i don't know even if Borland has conventions for 32-bit extended DOS. i've heard of WatCom C++, but haven't ever used it. also, DJGPP has tons of good resources on the 'net you can use to broaden your horizons... i'm not a sales rep for them or anything... [realizes irony of having a 'sales' rep for a free compiler...] but i say it just fits me really well...

    hth...
    hasafraggin shizigishin oppashigger...

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    6
    its not the code its windows.

    i have had the same problem

    i presume you are using the GNU compiler due to your asm syntax

    if you try borland its

    asm mov ax, 013h
    asm int 10h

    but i dont know whats wrong, asm code compiled with masm and tasm works even though its the same!

    speed is not critical for a reso-change, use an api

    use asm for a putpixel, getpixel combo

    UncleG

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    17

    Arrow

    use this:
    dos.h

    void SetVGA()
    {
    _AX = 0x0013;
    geninterrupt (0x10);
    }

    But U need BGI mode to do this.. and these graphics are very bad and low!!! But I dont care

  6. #6
    Anti-Terrorist
    Join Date
    Aug 2001
    Location
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    Posts
    742
    The graphics are not very good and there is not a lot of literature to study because these libraries are unsupported. Not even the new operating systems support 13h graphics libraries.
    I compile code with:
    Visual Studio.NET beta2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Statistical Mode Function
    By h4rrison.james in forum C Programming
    Replies: 5
    Last Post: 01-16-2009, 09:48 PM
  2. Problem with default font in graphical mode
    By voldemarz in forum C Programming
    Replies: 16
    Last Post: 10-24-2008, 02:30 PM
  3. Results in Debug and Release mode are different
    By jaro in forum C Programming
    Replies: 11
    Last Post: 05-27-2006, 12:08 PM
  4. opengl help
    By heat511 in forum Game Programming
    Replies: 4
    Last Post: 04-05-2004, 02:08 AM
  5. Grayscale and mode 13h
    By SMurf in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 05-08-2002, 01:36 PM

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