Template: uint_flex not usable as rep... Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Advanced Features » Template: uint_flex not usable as repetition count? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Raymond Kloprogge
Posted on Thursday, Aug 25, 2005 - 18:25:   

Hello,
I'm trying to interpret a data format where bits 4 to 0 in a certain byte are used to indicate the number of description blocks following.
So I would use something like:
uint_flex "4,3,2,1,0" "Count"
move -3
{
uint8 "Some byte ~"
} [Count]
Unfortunately 'Count' is not accepted as repetition count.
An alternative could be
uint8 "Count"
{
uint8 "Some byte ~"
} [Count & 0x1f]
But that is also no allowed.

Do you have a solution?
Thank you in advance.

I'm using WinHex 12.05SR3
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Thursday, Aug 25, 2005 - 18:36:   

Sorry, are you using a registered version of WinHex? Cannot find your name in our customer database.
Top of pagePrevious messageNext messageBottom of page Link to this message

Raymond Kloprogge
Posted on Thursday, Aug 25, 2005 - 18:38:   

Oh yes, the following construction gives an error on the [unlimited]:

uint8 "Count"
numbering 1
{
IfEqual ~ Count
ExitLoop
EndIf
uint8 "Some byte ~"
} [unlimited]

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.