summaryrefslogtreecommitdiff
path: root/fpcdocs/go32ex/flags.pp
blob: e9f8ffabf999d09e533934fcb14833437082b24f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
uses
        go32;

var
        r : trealregs;

begin
        r.ax := $5300;
        r.bx := 0;
        realintr($15, r);
        if ((r.flags and carryflag)=0) then begin
                Writeln('APM v', (r.ah and $f), '.',
                        (r.al shr 4), (r.al and $f), ' detected');
        end else
                Writeln('APM not present');
end.