FUNCTION IsSB AS INTEGER
DIM SBdetected AS INTEGER
BasePort = &h220
SBdetected = -1
WHILE (BasePort <= &h280) AND (SBdetected = -1)
SBdetected = DspReset
IF SBdetected = -1 THEN BasePort = BasePort + &h20
WEND
IsSB = SBdetected
END FUNCTION
FUNCTION DspReset AS INTEGER
DIM STAT AS INTEGER
OUT BasePort + &h6,1
FOR CT% = 1 TO 100 : NEXT
OUT BasePort + &h6,0
STAT = 0 : CT = 0
WHILE (STAT <> &hAA) AND (CT < 100)
STAT = INP(BasePort + &hHE)
STAT = INP(BasePort + &hHA)
CT = CT + 1
WEND
IF STAT = &hAA THEN DspReset = 0 ELSE DspReset = -1
END FUNCTION
FUNCTION LineLinksVol AS INTEGER
OUT Baseport + 4, &H2E
LineLinksVol = INT(INP(Baseport + 5) / 16)
END FUNCTION
FUNCTION LineRechtsVol AS INTEGER
OUT Baseport + 4, &H2E
LineRechtsVol = INT(INP(Baseport + 5) AND 15)
END FUNCTION
SUB SetLineVol (Links, Rechts)
OUT Baseport + 4, &H2E
OUT Baseport + 5, Rechts + Links * 16
END SUB
|