Maurice Lombardi wrote:
1 - djgpp is a linear frame 32 bits system. It does not know about Segment:Offset addresses.
2 - djgpp is a protected mode system libe BP (not TP): The address even in BP would be Selector:Offset instead of
Segment:Offset. You would need to replace Const BiosSeg=$40 by Const BiosSeg=seg0040 (BP takes care to put the correct
selector instead of $40 in seg0040).
3 - there are a lot of functions to address physical memory in the djgpp's libc: look at _dpmi... functions by info
libc.
But probably the simplest would be to look to _far* functions (_farpeekb etc...) to peek/poke values at such addresses
with a minimum effort. You just have to declare these functions in your pascal program with asmname to make them known,
e.g.
function farpeekb(selector:ShortWord; offset:MedWord): byte; asmname "_farpeekb";
please read carefully the explanation in the _far* section of the info libc on how to use these functions (get
selectors...)
Besides, if you want to get the screen size, you can use
`ScreenSize' in the CRT unit. For other things where you need to
access BIOS variables in TP, there are also Pascal routines
available in GPC.
Frank
--
Frank Heckenbach, frank@g-n-u.de,
http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html