Hi, On Thu, Nov 9, 2023 at 4:39 PM Bernd Böckmann via Freedos-devel <freedos-devel@lists.sourceforge.net> wrote: > > > Could you please post the exact message you got from the compiler? > > For something like this "FarPointer(@Buffer)" I get the following error > message: > > "Error: Illegal type conversion: "Pointer" to "FarPointer"" > > My opinion is that this should be supported by the compiler, because it > is well defined for the small memory model I am working in.
I had thought @ was just an alias for the built-in Addr() function. (In classic / ISO Pascal, you can't get the address of anything, and '@' is a character substitute for '^'.) A quick search shows this: * https://wiki.freepascal.org/FPC_New_Features_3.2.0 FarAddr internal function Overview: There's a new i8086-specific internal function, similar to Addr(), called FarAddr(), which always returns a far pointer to the address of its argument. Notes: The built-in Addr() function and the @ operator return a pointer type (near or far), that depends on the memory model. When interfacing with DOS, BIOS and other 16-bit APIs, it is sometimes useful to be able to obtain a far pointer to a pascal variable or procedure/function, regardless of the selected memory model. Previously, you would have to use ifdefs, or do something like Ptr(Seg(x), Ofs(x)). Now, this can be replaced with the much nicer FarAddr(x). svn: r37629 _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel