David Hodges schrieb:
>
> > BTW: where do I get the sourcecodes of the "stable" releases ?
>
> ftp://ftp.dosemu.org
Thnx, I didn't see them at the first attempt :-(
> you forgot to say which version of dosemu you are using.
> The latest stable version is 0.98.6
That is the one I am using, I tried 0.99_11 development, too.
They both have that error in CMOS-Time.
I'll send my test-prog (DOS-exe) and its source (Pascal) with this mail.
--
Wr8Ul8r,
Martin
--
Visit: www.computermuseum.fh-kiel.de
Timers.exe
program timers;
uses crt,dos;
var regs:registers;
function hexbyte(b:byte):string; {this one is used for BCD display}
const hexziff:array[$0..$F]of
char=('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
begin hexbyte:=hexziff[b div $10]+hexziff[b mod $10]+' ';end;
begin
clrscr;
writeln('Press ESC to exit');
repeat
gotoxy(1,2);
regs.ax:=$2C00;{get time from DOS Int 21}
intr($21,regs);
with regs do begin
writeln('DOS time: ',CH:2,CL:3,DH:3);
end;
regs.ax:=$0200; {get time from Bios INT 1A}
intr($1A,regs);
clreol;
if regs.Flags and FCarry=FCarry then writeln('Error reading DOS time') else
with regs do begin
write('SYS time: ',hexbyte(CH),hexbyte(CL),hexbyte(DH));
if boolean(DL) then writeln('Daylight') else writeln;
end;
write('CMOS time: '); {Hack time out of CMOS}
port[$70]:=(port[$80] and $80) or $04; {Display it in BCD}
write(hexbyte(port[$71]));
port[$70]:=(port[$80] and $80) or $02;
write(hexbyte(port[$71]));
port[$70]:=port[$80] and $80;
write(hexbyte(port[$71]),' binary: ');{Display it in Binary}
port[$70]:=(port[$80] and $80) or $04;
write(port[$71]:2);
port[$70]:=(port[$80] and $80) or $02;
write(port[$71]:3);
port[$70]:=port[$80] and $80;
write(port[$71]:3,' ');
port[$70]:=(port[$80] and $80) or $0B; {Display CMOS settings for clock}
if (port[$71] and $04)=$04 then write('binary') else write('BCD');
port[$70]:=(port[$80] and $80) or $0B;
if (port[$71] and $02)=$02 then write(' 24h ') else write(' am/pm ');
port[$70]:=(port[$80] and $80) or $0B;
if (port[$71] and $01)=$01 then writeln(' DLS') else writeln;
delay(100); {Wait for user Abort / Input}
if keypressed then case UpCase(readkey) of
#27:break;
'I':begin
regs.flags:=$0000;
regs.ax:=$0F00;
intr($1A,regs);
if (regs.flags and fCarry)=fCarry then write('Initializing
CMOS failed') else write('Initialized CMOS');
end;
end else clreol;
until false;
end.