Page 1 of 1

serial i/o

Posted: Sun Jul 20, 2008 8:53 pm
by azar
Hello all,
I've got a quick question:
I haven't implimented much currently, but am working on getting a console base going, and then I'm going to move to IRQS and etc.
My question is this:
I'm visually impaired, and I use a screen reader.
This reader basically takes text that's on the screen, and speaks it so that I can use the computer.
I'm looking for a way, to test the OS without relying on sighted help.
Currently, it prints a banner message, and starts booting up, but I'd like to debug this.
I can start a service in vmware, but then I need to be able to read it.
My reader doesn't work with reading text inside vmware.
My solution is to use com0com, to make a virtual serial port, and then link that to vmware.
Then I can link the other serial to a connection through SecureCRT, and thus read the text being posted through the OS.
ow, here's the big question.
I'm looking for a way to read/write to and from the serial port--my origenal idea is to make the OS serial-capable, so I will have an option to send text through serial, also.
Second, I'm having a bit of an issue getting going.
I'm not totally sure where to go--the bootloader we have currently compiles, and there aren't any warnings. It automatically jumps to protected mode.
I'd like to be able to access the bios, (for time), at least, and more than likely other functions down the road.
How can this be accomplished through protected mode, if at all?
Is there a workaround to this?
I've started playing with the linux kernel, version 2.0 or so, but it's not very easy to trace what is going on--my asm knowledge isn't the best.
Thanks,
Azar

Re: serial i/o

Posted: Mon Jul 21, 2008 1:25 am
by suthers
You cannot use interrupts in protected mode, if you want to load stuff of your floppy for example using BIOS functions, you should do them before you jump into protected mode...
Jules

Re: serial i/o

Posted: Mon Jul 21, 2008 1:35 am
by JamesM
Hi,

As to your first question, setting up serial I/O in protected mode is pretty simple. Serial ports contains all the information you need to get going.

If you're still stuck, you can have a look at my own OS's serial implementation: Serial.cc, Serial.h.

Cheers,

James

Re: serial i/o

Posted: Mon Jul 21, 2008 11:16 am
by azar
JamesM wrote:Hi,

As to your first question, setting up serial I/O in protected mode is pretty simple. Serial ports contains all the information you need to get going.

If you're still stuck, you can have a look at my own OS's serial implementation: Serial.cc, Serial.h.

Cheers,

James
Thanks! this is exactly what I needed. :)

Re: serial i/o

Posted: Tue Jul 22, 2008 5:14 am
by lukem95
[OT] I'm very impressed with the readability/general tidyness of pedigree's code, my kernels always end up looking like a poor attempt at ASCII art :( [/OT]

try looking at an early linux source too, like 0.1