Graphic mode under gcc

  • Thread starter Jean-Baptiste CAMPESATO
  • Start date
J

Jean-Baptiste CAMPESATO

Hello,
I used GCC under Linux.
I want to change the graphic mode to write directly in the video memory.
I wrote that :
void setmode(unsigned int mode)
{
if (mode == 1)
{
__asm__("movl $0x13, %eax");
}
else
{
__asm__("movl $0x03, %eax");
}
__asm__("int $0x10");
}

I've a segfault at the "int instruction".

Thanks
 
P

Peter Nilsson

Jean-Baptiste CAMPESATO said:
Hello,
I used GCC under Linux.
I want to change the graphic mode to write directly in the video
memory. ...

ISO C only defines the core language, leaving tasks like yours
as implementation extensions. Because comp.lang.c only deals
with ISO C, your question is off-topic.

Please ask your question in a linux developers group.
 
U

Ulrich Eckhardt

Jean-Baptiste CAMPESATO said:
I used GCC under Linux.
I want to change the graphic mode to write directly in the video memory.

You cannot write to video memory directly in any decent OS. There are APIs
(the Linux framebuffer API, vgalib, SDL) that more or less do the same,
but those are not on topic here.

Uli
 
J

Jean-Baptiste CAMPESATO

Le Sat, 12 Mar 2005 01:58:58 -0800, Peter Nilsson a écrit :
nly defines the core language, leaving tasks like yours
as implementation extensions. Because comp.lang.c only deals
with ISO C, your question is off-topic.

Please ask your question in a linux developers group.

Scuse me...
 
M

Mac

ISO C only defines the core language, leaving tasks like yours
as implementation extensions. Because comp.lang.c only deals
with ISO C, your question is off-topic.

Please ask your question in a linux developers group.
^^^^^^^^
That's funny. I reread the orignal post very carefully, and I saw no
question. Just a series of statements.

;-)

--Mac
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,422
Latest member
LatashiaZc

Latest Threads

Top