<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
<PRE>
Hi Kevin,

I'm adding a VT100 serial console to the seabios code. 
Which can be set to port COM1 or COM2. 
I added the interrupt vector in the serial_setup() routine. 
And made the interrupt service routine. The compiling goes 
fine, no problems there. But in the linking stage an error 
is reported to the line of the interrupt service routine: 

make
  Compiling whole program out/ccode.16.s
  Compiling (16bit) out/code16.o
  Compiling whole program out/ccode32flat.o
  Building ld scripts (version "pre-0.6.2-20110115_103541-mbertens-desktop")
Fixed space: 0xe05b-0x10000  total: 8101  slack: 15  Percent slack: 0.2%
16bit size:           37264
32bit segmented size: 2217
32bit flat size:      14007
32bit flat init size: 38848
  Linking out/rom16.o
  Stripping out/rom16.strip.o
  Linking out/rom32seg.o
  Stripping out/rom32seg.strip.o
  Linking out/rom.o
`.discard.func16.src/serial.c.261' referenced in section `.text.init_hw.54839' of out/code32flat.o: defined in discarded section `.discard.func16.src/serial.c.261' of out/code32flat.o
make: *** [out/rom.o] Error 1

Can you tell me what i'm doing wrong or missing to do?

Below here are the code snippets:
</PRE>
<TT>    // INT(3/4)h : Serial Hardware Service Entry Point (for keyboard handling)</TT><BR>
<TT>    void VISIBLE16 handle_console_serial( void )</TT><BR>
<TT>    {</TT><BR>
<TT>        ...    // my code</TT><BR>
<TT>        ...</TT><BR>
<TT>    done:</TT><BR>
<TT>        eoi_pic1();</TT><BR>
<TT>    }</TT><BR>
<BR>
<BR>
<TT>    void</TT><BR>
<TT>    serial_setup(void)</TT><BR>
<TT>    {</TT><BR>
<TT>        ...  // orginal code</TT><BR>
<TT>    </TT><BR>
<TT>        ...</TT><BR>
<TT>        #if CONFIG_KEYBOARD_SERIAL</TT><BR>
<TT>            con_addr = GET_BDA( port_com[ CONFIG_KEYBOARD_SERIAL - 1 ] );</TT><BR>
<TT>            dprintf( 3, "keyboard on serial port %x\n", con_addr ); </TT><BR>
<TT>        # if CONFIG_KEYBOARD_SERIAL == 1 || CONFIG_KEYBOARD_SERIAL == 3 </TT><BR>
<TT>            enable_hwirq( 4, FUNC16( handle_console_serial ) );</TT><BR>
<TT>        # else</TT><BR>
<TT>            enable_hwirq( 3, FUNC16( handle_console_serial ) );</TT><BR>
<TT>        # endif</TT><BR>
<TT>        #endif</TT><BR>
<TT>    }</TT><BR>
<BR>
Regards,<BR>
<BR>
Marc Bertens
</BODY>
</HTML>