redirecting console output of bochs
redirecting console output of bochs
Hi,
I am try to write an OS by following a tutorial. I am using bochs as the emulator.
The OS writes to the screen by writing to vga memory. I need to know if there is a way to
redirect the output in bochs' console to a file. The problem is that bochs terminal doesnt allow scrolling so if there
are many lines of text there is no way to see the all the lines as they just scroll through fast.
What should I do ?
I am try to write an OS by following a tutorial. I am using bochs as the emulator.
The OS writes to the screen by writing to vga memory. I need to know if there is a way to
redirect the output in bochs' console to a file. The problem is that bochs terminal doesnt allow scrolling so if there
are many lines of text there is no way to see the all the lines as they just scroll through fast.
What should I do ?
- Thanks
Vaibhav jain
Vaibhav jain
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: redirecting console output of bochs
Use the port 0xE9 hack, or use the serial port.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: redirecting console output of bochs
Read the manual on bochsrc
Re: redirecting console output of bochs
add line "log: bochsout.txt" in the bochsrc config-file.
Re: redirecting console output of bochs
I am not asking about the ouput of bochs itself. Logging is already enabled.I am asking aboutbubach wrote:add line "log: bochsout.txt" in the bochsrc config-file.
the text that is written by the kernel to the terminal.
- Thanks
- Thanks
Vaibhav jain
Vaibhav jain
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: redirecting console output of bochs
I just tried the obvious solution of redirecting standard output and it just worked...
Re: redirecting console output of bochs
Are you referring to parallel port or port 0xE9 hack ?Combuster wrote:I just tried the obvious solution of redirecting standard output and it just worked...
- Thanks
Vaibhav jain
Vaibhav jain
-
- Member
- Posts: 510
- Joined: Wed Mar 09, 2011 3:55 am
Re: redirecting console output of bochs
By "to the terminal" you mean "to the (emulated) screen in text mode" right?vjain20 wrote:I am not asking about the ouput of bochs itself. Logging is already enabled.I am asking aboutbubach wrote:add line "log: bochsout.txt" in the bochsrc config-file.
the text that is written by the kernel to the terminal.
- Thanks
There's no way to do that, AFAIK, but you *can* have the routine that prints to the screen also output each character that it prints to the serial port (for general portability), or to port 0xE9, for convenience with Bochs. If you have the port E9 feature turned on in bochsrc, I believe every character output through port E9 will appear in your log file, assuming you have logging enabled (it will certainly appear on the terminal you're running Bochs in).
- xenos
- Member
- Posts: 1121
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: redirecting console output of bochs
Actually it's not in the log file, but only on the terminal (stdout). But of course you can redirect the terminal output to some file.linguofreak wrote:I believe every character output through port E9 will appear in your log file, assuming you have logging enabled (it will certainly appear on the terminal you're running Bochs in).
Re: redirecting console output of bochs
For anyone stumbling across this thread as I did, to capture the port E9 output, what you need to do is run bochs, as in bochs >xxx.txt, and all the port E9 output will appear in xxx.txt. I originally misunderstood this thread. I thought it was talking about redirecting the output of applications running under your OS, which wasn't very helpful.XenOS wrote:Actually it's not in the log file, but only on the terminal (stdout). But of course you can redirect the terminal output to some file.linguofreak wrote:I believe every character output through port E9 will appear in your log file, assuming you have logging enabled (it will certainly appear on the terminal you're running Bochs in).
Re: redirecting console output of bochs
Dude. This thread is 6 years old.
My blog: http://www.rivencove.com/