Marco van de Voort wrote:
In our previous episode, Tomas Hajny said:
There's a lot of use in embedded targets:
Ah, thank you. Finally an answer I can understand. :)
The case of MS-DOS using it e.g. to provide direct access to the video
adapter memory ($B800:0000), low-level information maintained by BIOS
($40:xxx), etc., as already mentioned by someone else (Marco?) is in
principle the same as use cases relevant for embedded targets.

Yes, but I thought it was square brackets, not parentheses. Address is
linearized using seg*16+ofs and addressed via %fs (for go32v2, for i8086 it
probably is used as is)

[Checks] No bracket or parentheses in the case of Turbo Pascal, but I'd point out that the syntax was $B800:$0000 i.e. the absolute address was two concatenated 16-bit words rather than a colon being acceptable in the middle of a 32-bit word. Modula-2 IIRC was about the same.

The C crowd would probably like to use (square) brackets on account of their array semantics, and in the general case it's arguable whether defining an absolute variable is better or worse than defining a pointer with an absolute initial value. I suppose that a compiler/linker could potentially interpret an absolute declaration as indicating that that location should not be swapped/overlaid/relocated.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to