For example:
Code: Select all
Structure RX
opcode.b
StructureBit ri.b ; byte representation (optional)
r.b[4] ; Big-Endian unsigned value with 4 bit length, max value = (2^4)-1
i.b[4] ; Big-Endian unsigned value with 4 bit length at 4 bit offset, max value = (2^4)-1
EndStructureBit
StructureBit bd.w ; word representation (optional)
b.b[4] ; Big-Endian unsigned value with 4 bit length, max value = (2^4)-1
d.b[12] ; Big-Endian unsigned value with 12 bit length at 4 bit offset, max value = (2^12)-1
EndStructureBit
EndStructure
Define MyValue.RX
MyValue\opcode = $72
MyValue\r = 15
MyValue\i = 0
MyValue\b = 0
MyValue\d = $FFF
I know that I can handle all this with bit shifting, but this new thing would make it a lot easier IMO.