Re: Assignment 2 - ROM

Ed Casas (edc@ece.ubc.ca) Thu, 2 Nov 2000 18:48:44 -0800


Date: Thu, 2 Nov 2000 18:48:44 -0800
From: Ed Casas <edc@ece.ubc.ca>
Subject: Re: Assignment 2 - ROM

> I understand that the example of the ROM given in the handout > successfully loads the accumulator with -3, increments it to 0, > and then goes to an infinite loop. > > But how does the computer know what to load (in this case, -3) > if we don't tell it exactly what to do? Is there an input of > this type to the computer? The program loads the appropriate value into the accumulator. It has to do this in a round-about way (it loads a positive number and then complements it) because the LOADI instruction can only load positive numbers. I didn't include any I/O devices on this computer to keep things simple. You could add input and output ports if you wanted to (but don't include them with your assignment so the TA doesn't get confused). > Also in this example, doesn't this piece of ROM only work for a > certain task (in this case, load -3 and make it 0), but not > others? Yes, if you wanted to run a different program you'd have to change the contents of the memory. You could use an external EPROM instead of an internal ROM so you can program it. > So, are we going to design the ROM in such a way that this > computer will perform at least one example of each of the 8 > tasks? You only have to do the tests described in the assignment. -- Ed Casas edc@ece.ubc.ca http://casas.ece.ubc.ca +1 604 822-2592