> So, I'm working with ISO8583, a "standard" (HAHAHAH!!!!!) The "standard" > allows but does not require, BCD encoding of numerical data. Which may or > may not have a BCD-encoded numerical length prefix. The prefix may or may > not be 1 to 3 bytes in length. Or the data might come with no prefix, and > be right justified in a fixed width field of known size. Or left justified. > So hard to tell these days. > > But I ramble. So I was just wanting to ask if anyone here has any simple > BCD conversion routines. > > But, actually, ignore the subject line. Just shoot me.
/sys/src/9/pc/devrtc.c has an example of simple conversions, but given that standard, i suppose simple is not what you're after. - erik