On Friday 08 November 2013 00:39:58 Sieghard wrote:
>
> Suppose there's some part having a 16 bit register that's subdivided into 5
> fields, bits 0 through 6, 7...8, 9...13, 14 and 15 (the latter are 1-bit
> fields, of course).
> Your construct might then look like:
>
> Register = RECORD
> Field_1: 0..127;
> Field_2: 0..3;
> Field_3: 0..31;
> Field_4: 0..1;
> Field_5: 0..1;
> END;
>
One probably would write
"
Register = bitpacked RECORD
Field_1: $0000..$007f;
Field_2: $0000..$0003;
Field_3: $0000..$001f;
Field_4: $0000..$0001;
Field_5: $0000..$0001;
END;
"
which already looks a little bit better. :-)
Martin
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk