Hello again,
After searching in my archives, I found a component called btbeeper, that directly accesses the speaker port on the mainboard, to play sounds. In the same fashion, and with the info from my previous post, you should be able to mock things up quite nicely ;-)
Here's the snippet (credited ofcourse)
(*-------------------------------------------------*)
{John Atkins [jatkins@paktel.compulink.co.uk] functions for playing beeps}
function _GetPort(address:word):word;
var
bValue: byte;
begin
asm
mov dx, address
in al, dx
mov bValue, al
end;
Result := bValue;
end;
(*----------------------------------------------*)
procedure _SetPort(address, Value:Word);
var
bValue: byte;
begin
bValue := Trunc(Value and 255);
asm
mov dx, address
mov al, bValue
out dx, al
end;
end;
{end snippet}
and remember that the cmos ports are $70 and $71 and you can hardly go wrong.
Here's the QuickBasic routine to calc the checksum I mentioned: (you should be able to translate that yourself)
{snippet start}
' Written by: TonHu, 1988-1989
SUB SetCheckCMOS (OldChecksum%) ' Update Checksum
SHARED Debug, Quiet
CurrentCheckSum% = ReadCMOS%("C", &H2E) ' Read current word
NewCheckSum = 0
FOR n% = &H10 TO &H2D ' Only checksum this part
NewCheckSum% = NewCheckSum% + ReadCMOS%("B", n%)
NEXT
NewCheckHigh% = INT(NewCheckSum% / 256)
IF Debug THEN PRINT "Checksums :"; NewCheckHigh%;
NewCheckLow% = NewCheckSum% - (NewCheckHigh% * 256)
IF Debug THEN PRINT NewCheckLow%; "("; NewCheckHigh% * 256 + NewCheckLow%; "

"
IF NewCheckSum% <> CurrentCheckSum% THEN
CALL WriteCMOS(&H2E, NewCheckHigh%)
CALL WriteCMOS(&H2F, NewCheckLow%)
IF Debug THEN PRINT "CMOS Checksum updated."; CurrentCheckSum%; "->"; NewCheckSum%
ELSE
IF Debug THEN PRINT "CMOS Checksum was Ok."
END IF
END SUB
{end snippet}
Remember, this is from a totally different app, but you should be able to get the hang of it.
HTH, X-)
TonHu