21.33FF kernel version string interface (Developers)
Or this dualistic implementation (Turbopascal / Freepascal)
(compatible with both FPC calling modes: oldfpccall and fastcall)
Procedure Get_FreeDOS_version_string_asm(var s,o:word);assembler;
asm
{$IFDEF FPC}
push esi
push edi
mov esi,s
mov edi,o
mov ax,33ffh
mov dx,0
int 21h
mov [esi],dx
mov [edi],ax
pop edi
pop esi
{$ELSE}
push si
push ds
mov ax,33ffh
mov dx,0
int 21h
lds si,s
mov [si],dx
lds si,o
mov [si],ax
pop ds
pop si
{$ENDIF}
end;
Function Get_FreeDOS_version_string:string;
var t:string;
s,o:word;
a,b:byte;
begin
Get_FreeDOS_version_string_asm(s,o);
t:='';
if s<>0 then
for a:=0 to 254 do
begin
b:=Mem[s:o+a];
if b=0 then break else
if b>=32 then t:=t+char(b);
end;
Get_FreeDOS_version_string:=t;
end;
begin
writeln(Get_freedos_version_string);
end.
---
DOS-u-akbar!
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