How to detect FreeDOS kernel from Turbo Pascal program? (Developers)
> > I am looking for a method of detection of running FreeDOS kernel
>
> set ax=0x3000 and call int 0x21, check whether the returned bh is 0xfd.
>
> if yes, set ax=0x33ff and call int 0x21, it returns a pointer dx:ax to a
> version string.
>
> how to express this in the programming language of your choice is up to
> you, please share an example implementation code snippet here
Success! It works even when FreeCOM is not used at all.
Uses Dos;
Function IsFreeDos : Boolean;
VAR Regs : Registers;
begin
With Regs do
begin
ax := $3000;
bx := $00;
end;
Intr ($21, Regs);
if Regs.bh = $FD then IsFreeDOS := TRUE else IsFreeDOS := FALSE
end;
Begin
WriteLn(IsFreeDos);
End.
---
echo g=ffff:0|debug>nul
Complete thread:
- How to detect FreeDOS kernel from Turbo Pascal program? - rosegondon, 14.01.2022, 22:39 (Developers)
- How to detect FreeDOS kernel from Turbo Pascal program? - mceric, 15.01.2022, 00:22
- How to detect FreeDOS kernel from Turbo Pascal program? - rosegondon, 15.01.2022, 16:20
- How to detect FreeDOS kernel from Turbo Pascal program? - Rugxulo, 19.01.2022, 01:05
- 21.33FF kernel version string interface - ecm, 15.01.2022, 17:32
- 21.33FF kernel version string interface - rosegondon, 17.01.2022, 20:06
- 21.33FF kernel version string interface - DosWorld, 18.01.2022, 02:54
- 21.33FF kernel version string interface - rosegondon, 18.01.2022, 09:06
- 21.33FF kernel version string interface - Laaca, 18.01.2022, 14:25
- 21.33FF kernel version string interface - tkchia, 18.01.2022, 15:30
- 21.33FF kernel version string interface - DosWorld, 18.01.2022, 16:44
- 21.33FF kernel version string interface - rosegondon, 18.01.2022, 19:14
- 21.33FF kernel version string interface - rosegondon, 18.01.2022, 09:06
- 21.33FF kernel version string interface - DosWorld, 18.01.2022, 02:54
- 21.33FF kernel version string interface - rosegondon, 17.01.2022, 20:06
- How to detect FreeDOS kernel from Turbo Pascal program? - Laaca, 18.01.2022, 19:06
- How to detect FreeDOS kernel from Turbo Pascal program? - Rugxulo, 19.01.2022, 00:57
- How to detect FreeDOS kernel from Turbo Pascal program? - Laaca, 19.01.2022, 10:33
- How to detect FreeDOS kernel from Turbo Pascal program? - Rugxulo, 19.01.2022, 00:57
- How to detect FreeDOS kernel from Turbo Pascal program? - rosegondon, 15.01.2022, 16:20
- How to detect FreeDOS kernel from Turbo Pascal program? - Oso2k, 15.01.2022, 00:24
- How to detect FreeDOS kernel from Turbo Pascal program? - Laaca, 15.01.2022, 11:09
- How to detect FreeDOS kernel from Turbo Pascal program? - mceric, 15.01.2022, 12:29
- How to detect FreeDOS kernel from Turbo Pascal program? - mceric, 15.01.2022, 00:22