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.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!NOSC-TECR.ARPA!CONTR47 From: CONTR47@NOSC-TECR.ARPA.UUCP Newsgroups: comp.lang.ada Subject: Multiple abstractions of a register? Message-ID: <8704120153.AA18401@ucbvax.Berkeley.EDU> Date: Sat, 11-Apr-87 21:00:01 EST Article-I.D.: ucbvax.8704120153.AA18401 Posted: Sat Apr 11 21:00:01 1987 Date-Received: Sun, 12-Apr-87 07:43:25 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet List-Id: Some inexpensive I/O devices use a totally different bit definition of a register depending on whether you are reading or writing the register. Therefore I would like to have two abstractions of the register address, one for reading and one for writing. e.g.: -- type status_type is (ok, error); for status_type use (ok=>1, error=>2); type command_type is (start, stop); for command_type use (start=> 1, stop => 2); status : status_type; command: command_type; for status use at 16#3_FFF#; for command use at 16#3_FFF#; -- LRM 13.5 (8) seems to say this is illegal - "Address clauses should not be used to achieve overlays of objects --" Does the LRM citation apply to my situation? Comments and suggestions are welcome. Thanks in advance. regards, sam harbaugh ---------------------