comp.lang.ada
 help / color / mirror / Atom feed
* Ada And Alternate System Architectures
@ 2001-08-23 16:01 Gary Scott
  2001-08-23 17:09 ` Marin David Condic
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Gary Scott @ 2001-08-23 16:01 UTC (permalink / raw)


Hi,

A very naive question...does the Ada standard adequately address
non-8-bit byte computers?  The Fortran language standard committee
consistently avoids defining anything that relates to a specific
computer architecture implementation (because what if 6-bit character
systems one day become common again...).  At a very high level, how are
machine specifics addressed?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 16:01 Ada And Alternate System Architectures Gary Scott
@ 2001-08-23 17:09 ` Marin David Condic
  2001-08-23 18:22   ` Gary Scott
  2001-08-23 17:10 ` Claude SIMON
  2001-08-23 18:11 ` Randy Brukardt
  2 siblings, 1 reply; 8+ messages in thread
From: Marin David Condic @ 2001-08-23 17:09 UTC (permalink / raw)


Ada bends over backwards to avoid specifying anything that would make it
impossible or impractical to implement Ada on just about any platform. For
example, Ada specifies Streams which will most often be implemented as 8-bit
bytes, but the element type is defined in terms of some system defined
storage unit - so it could be 16-bit words or anything else you like.
Similarly, the standard integer types have a minimum range required. For
example, ARM 3.5.4(21) says:

21 In an implementation, the range of Integer shall include the
range -2**15+1 .. +2**15-1.

That would suggest at least 16 bits - but it could be (and often is) 32
bits. On a PDP-10 it might be 36 bits.

Ada does exist on processors that aren't 8-bit byte machines. The
Mil-Std-1750a comes immediately to mind.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Gary Scott" <Gary.L.Scott@lmtas.lmco.com> wrote in message
news:3B8528F1.7B664D21@lmtas.lmco.com...
> Hi,
>
> A very naive question...does the Ada standard adequately address
> non-8-bit byte computers?  The Fortran language standard committee
> consistently avoids defining anything that relates to a specific
> computer architecture implementation (because what if 6-bit character
> systems one day become common again...).  At a very high level, how are
> machine specifics addressed?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 16:01 Ada And Alternate System Architectures Gary Scott
  2001-08-23 17:09 ` Marin David Condic
@ 2001-08-23 17:10 ` Claude SIMON
  2001-08-23 18:11 ` Randy Brukardt
  2 siblings, 0 replies; 8+ messages in thread
From: Claude SIMON @ 2001-08-23 17:10 UTC (permalink / raw)


The ARM define a package named System.Storage_Elements in which a type
Storage_Element :

type Storage_Element is mod <implementation-defined> ;
for Storage_Element'Size use Storage_Unit;

Storage_Unit is a constant implementation defined : the number of bits per
storage element.





Gary Scott a �crit :

> Hi,
>
> A very naive question...does the Ada standard adequately address
> non-8-bit byte computers?  The Fortran language standard committee
> consistently avoids defining anything that relates to a specific
> computer architecture implementation (because what if 6-bit character
> systems one day become common again...).  At a very high level, how are
> machine specifics addressed?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 16:01 Ada And Alternate System Architectures Gary Scott
  2001-08-23 17:09 ` Marin David Condic
  2001-08-23 17:10 ` Claude SIMON
@ 2001-08-23 18:11 ` Randy Brukardt
  2001-08-23 22:57   ` Keith Thompson
  2001-08-24  6:55   ` Petter Fryklund
  2 siblings, 2 replies; 8+ messages in thread
From: Randy Brukardt @ 2001-08-23 18:11 UTC (permalink / raw)


>A very naive question...does the Ada standard adequately address
>non-8-bit byte computers?  The Fortran language standard committee
>consistently avoids defining anything that relates to a specific
>computer architecture implementation (because what if 6-bit character
>systems one day become common again...).  At a very high level, how are
>machine specifics addressed?

Yes, Ada does support machines that don't have 8 bit bytes. There have
existed Ada compilers for machines that don't have 8-bit bytes. For
instance, we made a version of Janus/Ada 95 for the Unisys U2200, which
has 36-bit words, and to a lesser extent, 6 and 9 bit bytes.

Types like Character and Stream_Element can have any size appropriate to
the hardware. The main problem is importing and exporting data created
in such formats.

            Randy Brukardt.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 17:09 ` Marin David Condic
@ 2001-08-23 18:22   ` Gary Scott
  2001-08-23 18:45     ` Marin David Condic
  0 siblings, 1 reply; 8+ messages in thread
From: Gary Scott @ 2001-08-23 18:22 UTC (permalink / raw)


Hi,

Thanks.  Fortran 95 defines a bit model for integers and then provides
intrinsics for manipulating bits within that bit model.  What I was
wanting was a key word optional argument for bit manipulation intrinsics
that allowed me to very slightly modify the bit model by specifying an
"endian" (byte) key word.  This would allow me to write "portable" code
between big/little endian 8-bit byte systems.  Apparently if it's only
99.9% portable or acknowledges the existence of a "byte", it can't be
considered.  I guess I understand, but it seems like this could be
addressed through an architecture/system dependent modularized
definition.

Marin David Condic wrote:
> 
> Ada bends over backwards to avoid specifying anything that would make it
> impossible or impractical to implement Ada on just about any platform. For
> example, Ada specifies Streams which will most often be implemented as 8-bit
> bytes, but the element type is defined in terms of some system defined
> storage unit - so it could be 16-bit words or anything else you like.
> Similarly, the standard integer types have a minimum range required. For
> example, ARM 3.5.4(21) says:
> 
> 21 In an implementation, the range of Integer shall include the
> range -2**15+1 .. +2**15-1.
> 
> That would suggest at least 16 bits - but it could be (and often is) 32
> bits. On a PDP-10 it might be 36 bits.
> 
> Ada does exist on processors that aren't 8-bit byte machines. The
> Mil-Std-1750a comes immediately to mind.
> 
> MDC
> --
> Marin David Condic
> Senior Software Engineer
> Pace Micro Technology Americas    www.pacemicro.com
> Enabling the digital revolution
> e-Mail:    marin.condic@pacemicro.com
> Web:      http://www.mcondic.com/
> 
> "Gary Scott" <Gary.L.Scott@lmtas.lmco.com> wrote in message
> news:3B8528F1.7B664D21@lmtas.lmco.com...
> > Hi,
> >
> > A very naive question...does the Ada standard adequately address
> > non-8-bit byte computers?  The Fortran language standard committee
> > consistently avoids defining anything that relates to a specific
> > computer architecture implementation (because what if 6-bit character
> > systems one day become common again...).  At a very high level, how are
> > machine specifics addressed?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 18:22   ` Gary Scott
@ 2001-08-23 18:45     ` Marin David Condic
  0 siblings, 0 replies; 8+ messages in thread
From: Marin David Condic @ 2001-08-23 18:45 UTC (permalink / raw)


Clearly, you need to read Chapter 13. If you are trying to do low level
system dependent things - or build things where the representation can be
controlled to be system independent, this is the chapter for you.

Specifically, see:

13.5.3 Bit Ordering
13.3 Representation Attributes

You can learn to use clever things like "for S'Bit_Order use
High_Order_First ;" and similar clever things by getting familiar with
Chapter 13.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Gary Scott" <Gary.L.Scott@lmtas.lmco.com> wrote in message
news:3B8549D8.A4E3A04A@lmtas.lmco.com...
> Hi,
>
> Thanks.  Fortran 95 defines a bit model for integers and then provides
> intrinsics for manipulating bits within that bit model.  What I was
> wanting was a key word optional argument for bit manipulation intrinsics
> that allowed me to very slightly modify the bit model by specifying an
> "endian" (byte) key word.  This would allow me to write "portable" code
> between big/little endian 8-bit byte systems.  Apparently if it's only
> 99.9% portable or acknowledges the existence of a "byte", it can't be
> considered.  I guess I understand, but it seems like this could be
> addressed through an architecture/system dependent modularized
> definition.
>
> Marin David Condic wrote:
> >
> > Ada bends over backwards to avoid specifying anything that would make it
> > impossible or impractical to implement Ada on just about any platform.
For
> > example, Ada specifies Streams which will most often be implemented as
8-bit
> > bytes, but the element type is defined in terms of some system defined
> > storage unit - so it could be 16-bit words or anything else you like.
> > Similarly, the standard integer types have a minimum range required. For
> > example, ARM 3.5.4(21) says:
> >
> > 21 In an implementation, the range of Integer shall include the
> > range -2**15+1 .. +2**15-1.
> >
> > That would suggest at least 16 bits - but it could be (and often is) 32
> > bits. On a PDP-10 it might be 36 bits.
> >
> > Ada does exist on processors that aren't 8-bit byte machines. The
> > Mil-Std-1750a comes immediately to mind.
> >
> > MDC
> > --
> > Marin David Condic
> > Senior Software Engineer
> > Pace Micro Technology Americas    www.pacemicro.com
> > Enabling the digital revolution
> > e-Mail:    marin.condic@pacemicro.com
> > Web:      http://www.mcondic.com/
> >
> > "Gary Scott" <Gary.L.Scott@lmtas.lmco.com> wrote in message
> > news:3B8528F1.7B664D21@lmtas.lmco.com...
> > > Hi,
> > >
> > > A very naive question...does the Ada standard adequately address
> > > non-8-bit byte computers?  The Fortran language standard committee
> > > consistently avoids defining anything that relates to a specific
> > > computer architecture implementation (because what if 6-bit character
> > > systems one day become common again...).  At a very high level, how
are
> > > machine specifics addressed?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 18:11 ` Randy Brukardt
@ 2001-08-23 22:57   ` Keith Thompson
  2001-08-24  6:55   ` Petter Fryklund
  1 sibling, 0 replies; 8+ messages in thread
From: Keith Thompson @ 2001-08-23 22:57 UTC (permalink / raw)


"Randy Brukardt" <randy@rrsoftware.com> writes:
[...]
> Types like Character and Stream_Element can have any size appropriate to
> the hardware. The main problem is importing and exporting data created
> in such formats.

Well, Character has to support at least 256 values (128 in Ada 83), so
it can't be a 6-bit type.

-- 
Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Cxiuj via bazo apartenas ni.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada And Alternate System Architectures
  2001-08-23 18:11 ` Randy Brukardt
  2001-08-23 22:57   ` Keith Thompson
@ 2001-08-24  6:55   ` Petter Fryklund
  1 sibling, 0 replies; 8+ messages in thread
From: Petter Fryklund @ 2001-08-24  6:55 UTC (permalink / raw)


I worked for UNIVAC ... SPERRY ... UNISYS 1976 - 1991. I'd really love to
program a 2200 using Ada. Is it still in use?


Randy Brukardt wrote in message <9m3h4n$onh$1@news.online-isp.com>...
>>A very naive question...does the Ada standard adequately address
>>non-8-bit byte computers?  The Fortran language standard committee
>>consistently avoids defining anything that relates to a specific
>>computer architecture implementation (because what if 6-bit character
>>systems one day become common again...).  At a very high level, how are
>>machine specifics addressed?
>
>Yes, Ada does support machines that don't have 8 bit bytes. There have
>existed Ada compilers for machines that don't have 8-bit bytes. For
>instance, we made a version of Janus/Ada 95 for the Unisys U2200, which
>has 36-bit words, and to a lesser extent, 6 and 9 bit bytes.
>
>Types like Character and Stream_Element can have any size appropriate to
>the hardware. The main problem is importing and exporting data created
>in such formats.
>
>            Randy Brukardt.
>
>
>





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-08-24  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-23 16:01 Ada And Alternate System Architectures Gary Scott
2001-08-23 17:09 ` Marin David Condic
2001-08-23 18:22   ` Gary Scott
2001-08-23 18:45     ` Marin David Condic
2001-08-23 17:10 ` Claude SIMON
2001-08-23 18:11 ` Randy Brukardt
2001-08-23 22:57   ` Keith Thompson
2001-08-24  6:55   ` Petter Fryklund

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