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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!unix!trent From: trent@unix.SRI.COM (Ray Trent) Newsgroups: comp.lang.ada Subject: Re: Memory Access Question Message-ID: <1706@unix.SRI.COM> Date: 27 Jul 89 18:53:59 GMT References: <1372@crdgw1.crd.ge.com> Reply-To: trent@unix.sri.com (Ray Trent) Organization: SRI International, Menlo Park, CA List-Id: In the above article, hammondr@sunroof.crd.ge.com (richard a hammond) writes: >In article <18800002@ucf-cs.ucf.edu> tony@ucf-cs.ucf.edu writes: >>I am looking for a program that tests memory. Instruction and data space >>are seperate on my machine and I am trying to test RAM from 0 to n. I have >[various other grumbling] >Ada was designed to write portable, safe software. Reading/writing >all locations in memory is possibly portable, but certainly not safe. >Use the tool suited to the job, assembly language. Why not just say: No, you can't do it in Ada (easily), nor should you want to. This is not convincing if a client wants *all* of the code delivered to be written in Ada (many of them are absolutely stupid about this). Or perhaps you could just say: check if your implementation uses integers as pointers and use unchecked conversion to do pointer arithmetic. The answer to the question is: it's implementation dependent whether you can even do what you want in Ada...if access types are implemented as integers, you have a pretty good chance of being able to do what you want via unchecked conversion. If that's unacceptable, then you're out of luck, use another language. -- "When you're down, it's a long way up When you're up, it's a long way down It's all the same thing And it's no new tale to tell" ../ray\..