freebsd5/sys/i386/apm/apm.c
/* register driver version (APM 1.1 or later) */
register driver version (APM 1.1 or later)
register driver version ( APM 1 . 1 or later )
static int
apm_driver_version(int version)
{
	struct apm_softc *sc = &apm_softc;
	sc->bios.r.eax = (APM_BIOS << 8) | APM_DRVVERSION;
	sc->bios.r.ebx  = 0x0;
	sc->bios.r.ecx  = version;
	sc->bios.r.edx = 0;
	if (apm_bioscall() == 0 && sc->bios.r.eax == version)
		return (0);
	if (sc->bios.r.eax == ((APM_BIOS << 8) | APM_DRVVERSION))
		return (0);
	return (1);
}
static int apm_driver_version ( int version ) { struct apm_softc * sc = & apm_softc ; sc -> bios . r . eax = ( APM_BIOS << 8 ) | APM_DRVVERSION ; sc -> bios . r . ebx = 0x0 ; sc -> bios . r . ecx = version ; sc -> bios . r . edx = 0 ; if ( apm_bioscall ( ) == 0 && sc -> bios . r . eax == version ) return ( 0 ) ; if ( sc -> bios . r . eax == ( ( APM_BIOS << 8 ) | APM_DRVVERSION ) ) return ( 0 ) ; return ( 1 ) ; }
register driver version (APM 1.1 or later)
register driver version ( APM 1 . 1 or later )
/* Some old BIOSes don't return the connection version in %ax. */