From: Skip Tavakkolian <9nut@9netics.com>
To: quanstro@quanstro.net, 9fans@9fans.net
Subject: Re: [9fans] BCD encoding in Plan9 - don't shoot me
Date: Fri, 12 Feb 2016 09:44:59 -0800 [thread overview]
Message-ID: <3df2441e04d6927e27b52beac75e8c97@9netics.com> (raw)
if i understand it correctly (reading wikipedia's description) the
field is either packed BCD (each nibble is the binary representation
of the digit) or ebcdic representation of the digits (see /sys/src/cmd/dd.c:618)
> 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
next reply other threads:[~2016-02-12 17:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 17:44 Skip Tavakkolian [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-10 1:02 Winston Kodogo
2016-02-12 17:43 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3df2441e04d6927e27b52beac75e8c97@9netics.com \
--to=9nut@9netics.com \
--cc=9fans@9fans.net \
--cc=quanstro@quanstro.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).