Page 1 of 1

GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do th

Posted: Wed Nov 06, 2002 12:00 am
by _markus_
...

thx , Markus

RE:GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do

Posted: Wed Nov 06, 2002 12:00 am
by Tom Fritz
It's not easy....as with all coding, but here is a old and graph init and putpixel ( fast )

int in13h;

void Set13h() // init graph 13h ( 320x300x256 )
{
   asm mov ax, 13h
   asm int 10h

   in13h = 1;
}

void SetTCGraph() // int graph 640x480x16 ( TC's graphics.h needed )
{
       /* request auto detection */
     int gdriver = DETECT, gmode, erro

     /* initialize graphics mode */
     initgraph(&gdriver, &gmode, "");
}

void PutPixel13h() // for putting pixels in 13h mode...if used TC's lib...
// use putpixel();
{
    if ( in13h = 1 )
    {
     asm{
     mov ax, VGA
     mov es, ax
     mov bx, [posx]
     mov dx, [posy]
     mov di, bx
     mov bx, dx
     shl dx, 8
     shl bx, 6
     add dx, bx
     add di, dx
     mov al, [pixcolor]
     stosb
     }
     }

  else printf( "Not In 13h Mode\n" );
}

that's real not simple - but why does my compiler find 7 err

Posted: Wed Nov 06, 2002 12:00 am
by sg
...
thx , Markus

RE:GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do

Posted: Wed Nov 06, 2002 12:00 am
by Tom Fritz
change this line
int gdriver = DETECT, gmode, erro

to

int gdriver = DETECT, gmode;

try that, and tell me what the errors are...(you need TC or TC++ to compile/link)

now only 6 errors

Posted: Sun Nov 10, 2002 12:00 am
by sg
ok , that are the errors my compiler(TC++) finds:

   72: Declared Syntax error
   80: Unterminated string or character constant
   80: Character constant too long
   88: Unterminated string or character constant
   88: Character constant too long
   89: Declared Syntax error

  ( compiled with TC++ )

RE:now only 6 errors

Posted: Sun Nov 10, 2002 12:00 am
by Tom Fritz
did you #include <graphics.h>

?

also...c/p the lines that have errors AFTER trying including <graphics.h>

RE:now only 6 errors

Posted: Sun Nov 10, 2002 12:00 am
by carbonBased
With all due respect, if you can't get a grasp on BGI, how do you intend to write an operating system?

Also of note, BGI is (c) Borland.  I don't know that you can write an open source OS with it, let alone a commercial one (does anybody know for sure)?

Cheers,
Jeff