I am an occassioal dabbler in this sort of thing when the need arises and being a lapsed SAS programmer I can usually figure things out by tracking stuff down on the web, but this has got me stumped (I used to work with SMF on MVS. so decoding and bit testing using SAS was a doddle).

I have a 256 character hex string, which is the 128 byte EDID string from the attached monitor, the VESA spec states that the Manufacturer 3 character code is contained in 2 bytes, each character is represented by 5 bits of the 16 in those 2 bytes, using the 5 bits as decimal 1=A 2=B 3=C etc.. So using a pencil and scientific calculator I have figured out when I need to do but cannot find any function in BASH to perform them.
My calculations give me...
as Hex = 15c3
as binary = 0001010111000011
so dropping the first bit, then 00101=5=E, 01110=14=N, 00011=3=C, and I get ENC which apparently the code for EIZO.

It is probably not possible in BASH script so may have to look at Perl or similar to do it.

Any comments would be welcome.

Cheers,
Nigel

Last edited by NigelPH on Sun Oct 22, 2006 4:21 pm, edited 1 time in total.