From: Jerry Petrey <"jdpetrey<NOSPAM>"@west.raytheon.com>
Subject: Re: rep clause confusion
Date: Thu, 03 Jan 2002 09:24:16 -0700
Date: 2002-01-03T09:24:16-07:00 [thread overview]
Message-ID: <3C3485B0.94A423C3@west.raytheon.com> (raw)
In-Reply-To: ed8Y7.27607$4x4.3341820@news2-win.server.ntlworld.com
"chris.danx" wrote:
>
> Hi,
>
> I've been looking at rep clauses(?), for laying seg descriptors for the x86,
> and one thing confuses me.
>
> for some_type
> use record
> abc at 0 range 0..7;
> def at 1 range 0..7;
> end record;
>
> The 'at' bit confuses me. Does this mean the storage element (numbered from
> zero)? If so that means, abc spans storage element zero bits 0..7 and def
> spans storage element 1 bits 0..7. Is this correct?
>
> Happy New Year,
> Chris
Yes, the value after AT gives a storage unit (as defined in package System -
in this case, apparently a byte) and it can extend outside the storage unit.
You could have written the following with the same results:
for some_type
use record
abc at 0 range 0..7;
def at 0 range 8..15;
end record;
Jerry
--
-----------------------------------------------------------------------------
-- Jerry Petrey
-- Senior Principal Systems Engineer - Navigation, Guidance, & Control
-- Raytheon Missile Systems - Member Team Ada & Team Forth
-- NOTE: please remove <NOSPAM> in email address to reply
-----------------------------------------------------------------------------
prev parent reply other threads:[~2002-01-03 16:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-01 1:25 rep clause confusion chris.danx
2002-01-01 5:23 ` Ted Dennison
2002-01-03 16:24 ` Jerry Petrey [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox