This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Software interrupt


Hello,

First, thank you for answer.

I studied the question : how to switch in real mode ? but it seems to be hardest than switching into protected mode. I found a trick about real mode : when CPU is in protected mode, we have to save all CPU registers and reset it. Is it normal to be obliged to do this kind of operation ?

I've an other idea, but it's very brutal : it's to do the work of the 0x10 interruption, and go write directly in the VGA control registers. I suppose this works, but it's very heavy to do.

I read and read again the eCos documentation, but I don't undestand if there's any function or macro (using HAL or kernel functions) allowing me to emit software interruption rather than using ASM.

An other question, CPU isn't supposed to start in real mode ? If this is wrong, it's seems to be very hard to come back in real mode ! It's strange to go write directly in CPU or VGA card register, i think (hope) that there's some methods doing this difficult job.

My aim is simply to display pixel on screen, by all way. this one of my ideas, if you have another one, fell free to explain it

Regards.
Antoine


Andrew Lunn <andrew@lunn.ch> a écrit :


On Thu, Feb 28, 2008 at 09:01:44PM +0100, Antoine.Amirault@esial.uhp-nancy.fr wrote:
Hi!

I'm trying to write on the VGA buffer of a PC at the 0xa0000 address on
graphical mode (and not text).

I wrote a C program using interruption in ASM, trying to switch into
graphical mode :

asm volatile ( " movl $0x0013,%eax; int $0x10; " )

But apparently, it doesn't work.
 I think it's because the int mnemonic hasn't any effect.

Do you know how to use software interrupt under eCos (with or without
the HAL)?

Or do you know another way to write something on a screen by writing on
the video buffer?
I've managed to print some characters by writing directly in the text
buffer at the 0xb8000 address, but it doesn't work for the video buffer.

In summary, is there another way to emit software interruption ?

Is this to do with real and protected mode? I no nothing about this, but there has been some discussion about similar things in the past. So check the email archive. But i think the processor is in the wrong mode to be able to call the BIOS.

Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss






--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]