[fpc-devel]Support for 16-bit assembler ?
Florian Klaempfl
Florian.Klaempfl at gmx.de
Mon Dec 4 10:28:40 CET 2000
At 02:36 04.12.2000, you wrote:
> > OK, different question: is it possible to read/write from/to absolute
> > address without generating runtime error ?
> >
> > var p : ^byte;
> > begin
> > p := $f0000000;
> > writeln(p^);
> > end.
> >
> > This program generates runtime error 216. This is, I belive, general
> > protection fault.
>
>It's ok that the program crashes ... :-)
>
>that should work
>
>uses go32v2;
>
>var p:^byte;
>
>begin
> set_segment_limit(get_ds,$ffffffff);
>
>p:=pointer(get_linear_addr($f0000000,1)-get_segment_base_address(get_ds));
> writeln(p^);
>end.
>
>IMPORTANT: Write to any addresses ONLY if you know which areas
>in the address space you (over)write, otherwise
>it could result in data loss (happened to me once)
... and it works only for the DOS version. There is no way to get
this working on linux/win/os2 etc
More information about the fpc-devel
mailing list