Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Memory mapped devices from resl mode (Developers)

posted by Laaca Homepage, Czech republic, 27.02.2020, 17:50

> In DJGPP I use DPMI function for physical memory mapping. If you have some
> DPMI wrappers in FPC you can use it too.

In FPC I also can use the physical memory mapping. I use it for example for the LFB access or for ACPI.
However it is mapped into different segment than the default DS.

For accesing such mapped areas I have to use my own assembler wrappers. Like:
FarPokeB(segm:word;offs:dword;value:byte);assember;
asm
push es
mov ax,segm
mov es,ax
mov edi,offs
mov es:[edi],value
pop es
end;

Is possible to map it somehow into "main" address space to be able to use normal pascal code like this?

var dev_base:Pchar;
begin
dev_base:=Get_dev_base;
dev_base[offset]:=value;
...

I know that it is possible to extend the DS segment limit to reach the 4GB but I am not sure about compatibility with Win98, win XP, etc...

---
DOS-u-akbar!

 

Complete thread:

Back to the forum
Board view  Mix view
22752 Postings in 2119 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum