...
thx , Markus
GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do th
RE:GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do
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" );
}
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" );
}
RE:GRAPHIC INTERFACE (deskto , explorer , ... ) how can i do
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)
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
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++ )
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
did you #include <graphics.h>
?
also...c/p the lines that have errors AFTER trying including <graphics.h>
?
also...c/p the lines that have errors AFTER trying including <graphics.h>
RE:now only 6 errors
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
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