Writing to the console in bochs

It is possible to write characters to the console that bochs was started on with by using a bochs-specific hack. The I/O port 0xe9 is normally not used for anything on standard PCs. Bochs takes advantage of this fact to implement a "write to console" feature. Any character output to this port will be printed on the console. For this to work, bochs must be configured with the "--enable-port-e9-hack" option. With this feature compiled in, the following C code should write a short message to the console:
	outb(0xe9, 'I');
	outb(0xe9, 'N');
	outb(0xe9, 'F');
	outb(0xe9, '4');
	outb(0xe9, '1');
	outb(0xe9, '5');
	outb(0xe9, '0');

Last modified: Tue Nov 2 11:37:24 CET 2004