Hi Ajay, What i can infer from the above text is that you want to write a microprocessor simulator (microprocessor with extremely limited number of instructions and memory). So what exactly is the issue?? Are you facing problems with compiler(gcc)? Or you are not clear about the program design?
Please mention your problem in detail so that we can help you in better way. Regards, Ameya On 10/26/07, Ajay Ramesh <ajay.r20 at gmail.com> wrote: > > 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 > _______________________________________________ > ug-bosug mailing list > List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org > List-Owner: mailto:ug-bosug-owner at opensolaris.org > List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54 -- Dont think you are, Know you are. -Legendary Morpheus in The Matrix -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/ug-bosug/attachments/20071026/dc4da243/attachment.html>