Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

How to detect FreeDOS kernel from Turbo Pascal program? (Developers)

posted by Rugxulo Homepage, Usono, 19.01.2022, 01:05

> Success! It works even when FreeCOM is not used at all.

Minor improvements:


program whatfdos;
uses DOS;

function IsFreeDOS: boolean;
  var reg: registers;
begin
  reg.ax := $3000; reg.bx := 0;
  msdos(reg);
  IsFreeDOS := reg.bh = $FD
end;

begin
  writeln('FreeDOS = ',IsFreeDOS)
end.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 241 users online (0 registered, 241 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum