9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] BCD encoding in Plan9 - don't shoot me
Date: Fri, 12 Feb 2016 09:43:13 -0800	[thread overview]
Message-ID: <8a5caaeb3b1d56e75583468173563be3@lilly.quanstro.net> (raw)
In-Reply-To: <CAFiGbxgJ8OhdU39CcoYZr8=yZ3YHnyGNjVwsAQYq+QXP1B+rOA@mail.gmail.com>

> 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



  reply	other threads:[~2016-02-12 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  1:02 Winston Kodogo
2016-02-12 17:43 ` erik quanstrom [this message]
2016-02-12 17:44 Skip Tavakkolian

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=8a5caaeb3b1d56e75583468173563be3@lilly.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.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).