[fpc-pascal] variable declarations with 'absolute' syntax
Tomas Hajny
XHajT03 at hajny.biz
Wed Oct 14 19:28:42 CEST 2015
On Wed, October 14, 2015 17:19, 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)
There are no parentheses nor brackets when used with "absolute":
---------------
var
Shifts1: byte absolute $40:$17; (* shift status as set by BIOS *)
Shifts2: byte absolute $40:$18; (* (extended and normal) *)
===============
Brackets are used when using the other option for direct memory access -
accessing the memory as array via Mem[] / MemW[].
Tomas
More information about the fpc-pascal
mailing list