From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 12 Feb 2016 09:43:13 -0800 To: 9fans@9fans.net Message-ID: <8a5caaeb3b1d56e75583468173563be3@lilly.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] BCD encoding in Plan9 - don't shoot me Topicbox-Message-UUID: 8404294e-ead9-11e9-9d60-3106f5b1d025 > 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