Search found 8 matches

by quietdragon
Mon Mar 18, 2013 8:44 am
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

So my earlier post is wrong, and you should pay attention to what Barf wrote. From my (revised) point of view -16::0 is valid syntax, but it does not have a usefully defined value.

Ok. Thanks. It would be good to have the specification speak to this case. It could say that implementation ...
by quietdragon
Sun Mar 17, 2013 2:49 pm
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

First, note that the IRP spec has an error: it uses 2's complement rather than 1's complement . However, the accompanying text makes that clear.

ROTFL Well, I had a set of follow up questions about that which are now unnecessary.

Certainly 1s complement has made for a much more interesting ...
by quietdragon
Sun Mar 17, 2013 2:42 pm
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

See the end of section 5.3: Note that the "-" prefix is not permitted unless b is present. So -16::0 is not a legal construct. As you can probably tell, I'm a newbie at IRP. Please excuse my questions that miss the mark. What I had meant to write was:

<-1,1|1,-1>((-16)::0)
I think this is valid ...
by quietdragon
Sun Mar 17, 2013 9:37 am
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

Binary forms of bitfields with unspecified lengths

In http://www.hifi-remote.com/wiki/index.php?title=IRP_Notation#Data_Structures
A bitfield evaluates to a binary form, an integer value expressed in binary notation with a fixed finite or infinite bit length in which negative integers are expressed in 1's complement notation.
The document says ...
by quietdragon
Sat Mar 16, 2013 3:50 pm
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

3FG wrote:0 would mean zero bits.
Oh. Thanks. I had it backwards.

What about in expression contexts ?

For example:

Code: Select all

A=(12:3)
B=(12:0)
In this case, A=8. What is the expectation for the value of B ?
by quietdragon
Sat Mar 16, 2013 11:26 am
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

But I don't see a good reason to exclude b==0. Thanks for clarifying. Zero means variable number of bits.

I don't think I see that anywhere in the IRP Notation Specification.

This still leaves me with my other question regarding, it appears, either (-12)::0 or even 12::0. Since the width of the ...
by quietdragon
Sat Mar 16, 2013 11:05 am
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

The IRP Execution Model says:

ELSE IF irstream item IS bitfield THEN

EVALUATE bitfield AS binary form;
IF current bitspec IS NULL THEN

ERROR;

ELSE

PUSH binary form INTO buffer OF current bitspec;

END IF;


What is the correct interpretation for a bitfield with a negative value, for ...
by quietdragon
Sat Mar 16, 2013 10:39 am
Forum: JP1 - General Forum
Topic: IRP Specification
Replies: 52
Views: 86792

Bitfield semantics

I am working through an implementation of an IRP parser and following the details in http://www.hifi-remote.com/wiki/index.php?title=IRP_Notation#Semantics_4

I have a couple of questions. To begin:

If either b or c is negative then the bitfield is invalid. In the execution process, a bitfield is ...