comp.lang.ada
 help / color / mirror / Atom feed
* Re: Basic embedded concepts and Ada
@ 1993-01-06 18:15 Mark A Biggar
  0 siblings, 0 replies; 2+ messages in thread
From: Mark A Biggar @ 1993-01-06 18:15 UTC (permalink / raw)


In article <1993Jan6.022544.15622@saifr00.cfsat.honeywell.com> hawkinsg@saifr00
.cfsat.honeywell.com (Glenn Hawkins) writes:
>Question:  Will shifts, ANDs, ORs, etc be available in Ada 9x?

Yes these coem along with the new unsigned integer types in ada9x.

--
Mark Biggar
mab@wdl1.wdl.loral.com

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

* Re: Basic embedded concepts and Ada
@ 1993-01-12 22:12 Bob Kitzberger
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Kitzberger @ 1993-01-12 22:12 UTC (permalink / raw)


hawkinsg@saifr00.cfsat.honeywell.com (Glenn Hawkins) writes:

> Although our compiler is 
> pretty efficient with word and byte level accesses, it pretty much chokes on 
bit 
> level accesses, so representing the different registers as records of bits 
> (appropriately rep spec'ed, of course) doesn't seem practical.

Too bad; that's the preferred approach.

>I think that to set bits in these registers it would be easiest for
>me to define the objects representing the registers as 32-bit integers, allowi
ng
>me to simply add constants (1, 2, 4, 8, etc.) representing the different bits
>I want to set. Just like I would in JOVIAL, C, etc.

Don't forget that unsigned 32-bit integers are rarely supported in Ada
on 32-bit CPUs, so it's not as easy as you might wish to set the MSB.

>Seeing if a bit has been set seems more difficult.  [...] I would like to
avoid machine code insertions if possible.  Any ideas?

Since bit-level rep specs appear to be broken in your compiler, I'd use
machine code insertions to implement ANDs, ORs, etc.  I know you want
to avoid them (for portability reasons?), but if they're documented
as a workaround you can mitigate risk.

Then, call your Ada compiler vendor and ask them to fix rep specs.

	.Bob.
----------------
Bob Kitzberger          VisiCom Laboratories, Inc.
rlk@visicom.com         10052 Mesa Ridge Court, San Diego CA 92121 USA
                        +1 619 457 2111    FAX +1 619 457 0888

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

end of thread, other threads:[~1993-01-12 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-01-06 18:15 Basic embedded concepts and Ada Mark A Biggar
  -- strict thread matches above, loose matches on Subject: below --
1993-01-12 22:12 Bob Kitzberger

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