DWED first alpha (Announce)
> Another story: looks like Borland's DPMI16-server does not support LFN
> (passthru INT 21 for LFN). I try dwed16 with WinXP and have a fail.
> At the same time - real-mode dwed works with LFN under WinXP.
> Need do more research.
>
Of course that Borland's DPMI16 server (RTM.EXE) does not support the LFN. Or to be more correct - it does not support the API translation for LFN routines.
In legacy SFN routines the Borland's server detects that you are trying to call f.e. INT21h/AH=47h (GetCurrentDirectory). RTM.EXE has this call in its database and knows that DOS will use the realmode return buffer at DS:SI so RTM kindly copies realmode DS:SI into your protected mode DS:SI.
It works nice but RTM.EXE has to have the called function in it's database.
LFNs are not in this database.
In such cases you have to use the direct call od DPMI service 300h (simulate realmode interrupt).
The situation applies to VESA BIOS standard.
Look at this my Borland pascal 16-bit PM code:
{$DEFINE _Bez_WinAPI} {Jestli chces, tak umaz podtrzitko }
{$IFNDEF Bez_WinAPI}
uses WinAPI;
{$ENDIF}
type DPMIregs=record
EDI,ESI,EBP,Reserved,EBX,EDX,ECX,EAX:Longint;
Flags,ES,DS,FS,GS,IP,CS,SP,SS:word;
end;
{$IFDEF Bez_WinAPI}
Function GlobalDOSAlloc(w:word):longint;assembler;
asm
mov ax,100h
mov bx,w
shr bx,4 {BX se neuvadi v bajtech, ale v tzv. paragrafech. 1 paragraf=16 bajtu}
int 31h
xchg ax,dx
end;
Procedure GlobalDOSFree(w:word);assembler;
asm
mov ax,101h
mov dx,w
int 31h
end;
{$ENDIF}
Procedure DPMI_Preruseni(i:byte;var r:DPMIregs);assembler;
asm
mov ax,300h
xor bx,bx;mov bl,i
xor cx,cx { nebudu predavat zadny zasobnik }
les di,r
int 31h
end;
Function Segment_Na_Deskriptor(w:word):word;assembler;
asm
mov ax,2
mov bx,w
int 31h
end;
var vyrobce:pchar;
buffer:array[0..127] of word;
konv_buffer:longint;
real_segment:word;
r:DPMIregs;
p:pointer;
pp:^byte;
begin
konv_buffer:=GlobalDOSAlloc(256);
real_segment:=(word(konv_buffer shr 16));
p:=pointer(0); {Za tyhle tri radky se omlouvam, ale}
pp:=@p;inc(pp,2); {nepodarilo se mi to napsat}
move(konv_buffer,pp^,2); {srozumitelneji}
{-------------------------}
FillChar(r,sizeof(r),0);
r.es:=real_segment;
r.edi:=0;
r.eax:=$4f00;
DPMI_Preruseni($10,r);
{-------------------------}
Move(p^,buffer,256);
buffer[4]:=Segment_Na_Deskriptor(buffer[4]);
{ prevod realmodoveho segmentu na selektor pristupny z protektu }
Move(buffer[3],vyrobce,4);
writeln('Manufacturer of your videocard is: ',vyrobce);
readln;
GlobalDOSFree(word(konv_buffer));
end.
---
DOS-u-akbar!
Complete thread:
- DWED first alpha - DosWorld, 10.11.2020, 04:40 (Announce)
- DWED first alpha - Laaca, 10.11.2020, 11:50
- DWED first alpha - DosWorld, 10.11.2020, 16:03
- DWED first alpha - tom, 24.09.2022, 19:24
- DWED first alpha - rr, 10.11.2020, 11:53
- DWED first alpha - DosWorld, 10.11.2020, 15:18
- DWED first alpha - Laaca, 10.11.2020, 22:27
- DWED first alpha - Rugxulo, 10.11.2020, 22:34
- DWED first alpha - rr, 12.11.2020, 23:16
- DWED first alpha - DosWorld, 13.11.2020, 03:58
- DWED first alpha - RayeR, 13.11.2020, 18:12
- DWED first alpha - rr, 14.11.2020, 19:42
- DWED first alpha - DosWorld, 15.11.2020, 04:11
- DWED first alpha - rr, 15.11.2020, 19:20
- DWED first alpha - DosWorld, 15.11.2020, 04:11
- DWED first alpha - DosWorld, 13.11.2020, 03:58
- DWED first alpha - rr, 14.11.2020, 21:10
- DWED first alpha - DosWorld, 14.11.2020, 22:42
- DWED first alpha - rr, 15.11.2020, 19:41
- DWED first alpha - DosWorld, 15.11.2020, 20:17
- DWED first alpha - Laaca, 15.11.2020, 21:05
- DWED first alpha - DosWorld, 15.11.2020, 22:33
- DWED first alpha - Laaca, 16.11.2020, 18:37
- DWED first alpha - DosWorld, 16.11.2020, 19:44
- DWED first alpha - Laaca, 17.11.2020, 08:51
- DWED first alpha - DosWorld, 16.11.2020, 19:44
- DWED first alpha - rr, 16.11.2020, 23:02
- DWED first alpha - Laaca, 16.11.2020, 18:37
- DWED first alpha - DosWorld, 15.11.2020, 22:33
- DWED first alpha - rr, 16.11.2020, 23:04
- DWED first alpha - DosWorld, 17.11.2020, 15:28
- DWED first alpha - rr, 17.11.2020, 23:16
- DWED first alpha - DosWorld, 18.11.2020, 10:18
- DWED first alpha - rr, 18.11.2020, 21:44
- DWED first alpha - DosWorld, 19.11.2020, 01:42
- DWED first alpha - DosWorld, 27.11.2020, 13:08
- DWED first alpha - tom, 27.11.2020, 17:05
- DWED first alpha - DosWorld, 28.11.2020, 07:48
- DWED first alpha - ecm, 28.11.2020, 09:09
- DWED first alpha - bretjohn, 28.11.2020, 20:24
- DWED first alpha - DosWorld, 28.11.2020, 07:48
- DWED first alpha - tom, 27.11.2020, 17:05
- DWED first alpha - DosWorld, 27.11.2020, 13:08
- DWED first alpha - DosWorld, 19.11.2020, 01:42
- DWED first alpha - rr, 18.11.2020, 21:44
- DWED first alpha - DosWorld, 18.11.2020, 10:18
- DWED first alpha - rr, 17.11.2020, 23:16
- DWED first alpha - DosWorld, 17.11.2020, 15:28
- DWED first alpha - Laaca, 15.11.2020, 21:05
- DWED first alpha - DosWorld, 15.11.2020, 20:17
- DWED first alpha - rr, 15.11.2020, 19:41
- DWED first alpha - DosWorld, 14.11.2020, 22:42
- DWED first alpha - Laaca, 10.11.2020, 22:27
- DWED first alpha - DosWorld, 10.11.2020, 15:18
- DWED first alpha - Rugxulo, 10.11.2020, 21:22
- DWED first alpha - DosWorld, 10.11.2020, 22:18
- DWED first alpha - Rugxulo, 10.11.2020, 22:31
- DWED first alpha - DosWorld, 10.11.2020, 22:18
- DWED first alpha - glennmcc, 10.11.2020, 22:27
- DWED first alpha - DosWorld, 11.11.2020, 12:36
- DWED first alpha - RayeR, 12.11.2020, 00:27
- DWED first alpha - DosWorld, 12.11.2020, 02:36
- DWED first alpha - rr, 12.11.2020, 14:46
- DWED first alpha - tom, 24.09.2022, 19:37
- DWED first alpha - DosWorld, 12.11.2020, 02:36
- DWED first alpha - DosWorld, 14.11.2020, 02:41
- DWED first alpha - DosWorld, 16.11.2020, 04:23
- DWED first alpha - DosWorld, 16.11.2020, 17:16
- DWED first alpha - rr, 16.11.2020, 23:08
- DWED first alpha - rr, 06.12.2020, 17:25
- DWED first alpha - DosWorld, 07.12.2020, 03:46
- DWED first alpha - rr, 08.12.2020, 23:17
- DWED first alpha - DosWorld, 12.12.2020, 12:57
- DWED first alpha - rr, 12.12.2020, 20:37
- DWED first alpha - DosWorld, 13.12.2020, 02:15
- DWED first alpha - rr, 12.12.2020, 20:37
- DWED first alpha - DosWorld, 12.12.2020, 12:57
- DWED first alpha - rr, 08.12.2020, 23:17
- DWED first alpha - DosWorld, 07.12.2020, 03:46
- DWED first alpha - rr, 06.12.2020, 17:25
- DWED first alpha - DosWorld, 16.11.2020, 04:23
- DWED first alpha - RayeR, 12.11.2020, 00:27
- DWED first alpha - DosWorld, 12.01.2022, 03:13
- DWED first alpha - DosWorld, 14.01.2022, 00:40
- DWED first alpha - DosWorld, 17.01.2022, 17:17
- DWED first alpha - DosWorld, 23.09.2022, 13:56
- DWED first alpha - DosWorld, 01.10.2022, 01:33
- DWED first alpha - Zyzzle, 02.10.2022, 04:11
- DWED first alpha - DosWorld, 02.10.2022, 20:26
- DWED first alpha - Zyzzle, 02.10.2022, 04:11
- DWED first alpha - DosWorld, 01.10.2022, 01:33
- DWED first alpha - DosWorld, 23.09.2022, 13:56
- DWED first alpha - DosWorld, 05.04.2024, 12:19
- DWED first alpha - boeckmann, 05.04.2024, 13:01
- DWED first alpha - DosWorld, 05.04.2024, 13:05
- DWED first alpha - boeckmann, 05.04.2024, 13:01
- DWED first alpha - Laaca, 10.11.2020, 11:50