1 /* $NetBSD: comio.S,v 1.4 2003/04/16 14:23:11 dsl Exp $ */
3 /* serial console handling
4 modelled after code in FreeBSD:sys/i386/boot/netboot/start2.S
7 #include <machine/asm.h>
11 /**************************************************************************
12 INIT - Initialization (com number)
13 **************************************************************************/
24 call _C_LABEL(prot_to_real) # enter real mode
27 # Initialize the serial port (dl) to 9600 baud, 8N1.
33 calll _C_LABEL(real_to_prot) # back to protected mode
46 /**************************************************************************
47 PUTC - Print a character (char, com number)
48 **************************************************************************/
61 call _C_LABEL(prot_to_real) # enter real mode
70 calll _C_LABEL(real_to_prot) # back to protected mode
84 /**************************************************************************
85 GETC - Get a character (com number)
86 **************************************************************************/
97 call _C_LABEL(prot_to_real) # enter real mode
104 calll _C_LABEL(real_to_prot) # back to protected mode
117 /**************************************************************************
118 ISKEY - Check for keyboard interrupt (com number)
119 **************************************************************************/
130 call _C_LABEL(prot_to_real) # enter real mode
137 calll _C_LABEL(real_to_prot) # back to protected mode