Subject: Re: Machine-independent device drivers
To: None <email@example.com>
From: Bill Sommerfeld <firstname.lastname@example.org>
Date: 04/13/1995 10:54:13
Hmm. You could get the kind of flexibility & efficiency you're
looking for using C++ templates... (don't shoot me yet, please..).
Each of the device-specific inner-loop routines (what you're
incorrectly calling "millicode") would be a template function,
instantiated once per bus; the bus-specific "read register"/"write
register"/etc methods could be inlined.
This implies that with a little thought, you could probably design a
convention for abusing the C preprocessor (macros + multiple includes
of the same source file) to do the same thing.