comp.lang.ada
 help / color / mirror / Atom feed
From: Optikos <ZUERCHER_Andreas@outlook.com>
Subject: Re: Simple Data Endianness
Date: Thu, 13 Feb 2020 07:12:36 -0800 (PST)
Date: 2020-02-13T07:12:36-08:00	[thread overview]
Message-ID: <d91f27d2-56ac-4513-aef6-4e3056aa4fe3@googlegroups.com> (raw)
In-Reply-To: <r23arf$9ul$1@gioia.aioe.org>

On Thursday, February 13, 2020 at 5:10:44 AM UTC-6, Dmitry A. Kazakov wrote:
> On 2020-02-13 10:42, guijarrockGuijarro wrote:
> 
> > The problem I present today is related to the coexistence between big-endian and little-endian application data.
> 
> How low-level representation aspect might be relevant to application data?

If the exchange of app data between 2 or more computers is word-wise binary instead of byte-wise textual, such as via binary-formatted files or via binary-formatted datagrams/byte-streams as payload of networking protocols.

> >     type Colour is (BLACK,YELLOW,WHITE,RED);
> >     for Colour'SIZE use 32;
> > 
> > Is there any analogous way of doing this as in the case of compound types?
> 
> Should it include middle-endian packed binary-coded decimals with memory 
> parity bits? (:-))

middle-endian:  Yes, if porting to PDP11, Honeywell 316, and the like. ;^)

parity bits:  Yes, if porting to Prime 50 series that had mark-parity ASCII characters 128 to 255 packed 2 at a time into 16-bit bytes.  ;^)

BCD: Yes, if the app data was written to a file in BCD, such as easily so by a BCD capable language (e.g., COBOL, Ada).  This one is less of a joke, because these COBOL-written app-data files are commonplace on IBM mainframes, especially if the new work is Ada on non-mainframes reading in the data downloaded from mainframes.

  reply	other threads:[~2020-02-13 15:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  9:42 Simple Data Endianness guijarrockguijarro
2020-02-13 11:10 ` Dmitry A. Kazakov
2020-02-13 15:12   ` Optikos [this message]
2020-02-13 15:28     ` Dmitry A. Kazakov
2020-02-13 16:47       ` Optikos
2020-02-13 17:29         ` Dmitry A. Kazakov
2020-02-13 20:36           ` Optikos
2020-02-14  8:20             ` Dmitry A. Kazakov
2020-02-14 17:25               ` Optikos
2020-02-14 20:22                 ` Dmitry A. Kazakov
2020-02-15 14:56                   ` Optikos
2020-02-13 15:44 ` Daniel
2020-02-13 15:57   ` Dmitry A. Kazakov
2020-02-14 16:52 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox