Skip to content

Allow reordering (addressing) fields #9

@MarkJeronimus

Description

@MarkJeronimus

It would be useful (also for enhancement request #8) to be able to address a string of bits to allow reordering data and overlapping data.

For example:
00 11 22 33 44 55 66
with
A:16h B:16h C:{16@8}h D:{16@24}h
becomes:
A:0011 B:2233 C:1122 D:3344 ...

Continuation option 1. The 'current pointer' is always after the last bit ever read (as if by a max() function). Addressed access only pushes the pointer forward if it exceeds previously read data.

the above becomes:
A:0011 B:2233 C:1122 D:3344 A:5566 ...

Continuation option 2. The 'current pointer' should not be modified by an addressed field. Addressed field access just peeks into the data without modifying anything else.

the above becomes:
A:0011 B:2233 C:1122 D:3344 A:4455...

==Extras:==

<{16@24}h : The 16bit value starting bit 24 is interpreted little endian.
{16@-24}h : The 16bit value starting bit 24 before the current pointer.
{16@+24}h : The 16bit value starting bit 24 after the current pointer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions