From ajay.r20 at gmail.com Fri Oct 26 01:09:11 2007 From: ajay.r20 at gmail.com (Ajay Ramesh) Date: Fri, 26 Oct 2007 01:09:11 PDT Subject: [edu-challenge] Instruction Design Message-ID: <31864901.1193386181912.JavaMail.Twebapp@oss-app1> Can anyone help do this with gcc. [b]Assume the design includes a Program Counter, Accumulator, Arithmetic Logic Unit and Instruction Register. Let ?addr? denote the address (field) and ?mem [addr]? denotes contents of memory location ?addr?. Note 1: The Memory is external to the Processor Note 2: Assume memory is 4K by 16 bits Designing an Instruction Set to do the following: 1. Load Accumulator from memory location ?addr? 2. Store Contents of Accumulator to memory location ?addr? 3. Add the Contents of Accumulator and memory location ?addr? and store in Accumulator 4. Subtract the Contents of memory location ?addr? from Accumulator and store in Accumulator 5. Load the Program Counter from memory location ?addr? 6. Set the Accumulator to ?addr? if accumulator >= zero 7. Set the Accumulator to ?addr? if accumulator not equal to zero 8. Stop the Processor[/b] This message posted from opensolaris.org