From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,78b2880bc7e78e39 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-14 14:42:25 PST Path: supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!btnet-peer!btnet-peer0!btnet!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: <3AAFE967.44BAEDAD@averstar.com> Subject: Re: RISC X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Wed, 14 Mar 2001 22:36:07 -0000 NNTP-Posting-Host: 62.252.144.54 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 984609368 62.252.144.54 (Wed, 14 Mar 2001 22:36:08 GMT) NNTP-Posting-Date: Wed, 14 Mar 2001 22:36:08 GMT Organization: ntlworld News Service Xref: supernews.google.com comp.lang.ada:5742 Date: 2001-03-14T22:36:07+00:00 List-Id: Thanks for the info. One thing i don't get is > 4) use a modular type and use "and" with 255 or 65535 to extract the lower-order > 8/16bits. The problem is in clearing/setting the lower 8/16bits, not extracting them. I simply took the 'mod' of the register to 255/65535 to get this. Still this maybe inefficient, i'll try it that way thanks. For 16bit extract 0000FFFF and Register? Is that correct? Still don't know how to clear or set the lower bits while preserving the top 16/24. What did you mean by > 1) Declare a record type (or types) and use a record rep clause (or clauses) > to define the fields you are interested in. I don't know what you mean by this. I put my code for the 'set' word/byte in, maybe it'll explain it better than i can. * -- a type representing the register; * -- * type register * is record * * id : natural; * data : register_block; * * end record; * -- set the contents of a register; * -- * procedure set_data (reg : in out register; * data : in word) is * begin * -- and this! * reg.data := ((reg.data / 65536) * 65536) xor long_word(data); * end set_data; * -- set the contents of a register; * -- * procedure set_data (reg : in out register; * data : in byte) is * begin * -- i've got to improve the efficiency of this; * reg.data := ((reg.data / 256) * 256 ) xor register_block(data); * end set_data; thanks, Christopher Campbell