There is disclosed an apparatus for controlling a physical layer interface
of a network interface card in real time. The apparatus comprises: 1) a
first memory for storing a multitasking control program, the multitasking
control program comprising a main routine and a plurality of subroutines
callable by the main routine; 2) a second memory for storing a plurality
of multitasking vectors associated with the multitasking control program;
and 3) a microcontroller for executing the multitasking control program,
wherein program execution control is transferred from the main routine to
a first one of the plurality of subroutines when the first subroutine is
called by the main routine and wherein the first subroutine, upon
encountering a decision point in the first subroutine that is not yet
capable of being decided, updates a first one of the plurality of
multitasking vectors associated with the first subroutine with an address
of the decision point and transfers program execution control back to the
main routine.