We'll be looking at a representative system. There will be several sections that will address this representative system. In order to understand a microprocessor operation, we'll examine a short program and its execution. Before a program is written, an instruction set is needed. The instructions in the sample program are … Instructions sets actually are quite large. We're going to just look at three instructions that would be a part of a microprocessor instruction set. We'll be looking at input, output, and jump, or jump/branch. A sample of input, output, and jump are provided in Table 16-1 in your text. I have recreated that table on this particular slide. In this case, we're going to be looking at the instruction input, the instruction output, and the instruction branch. The binary equivalent of the input is going to be this binary value. This is actually the instruction it says input. This will be the instruction that is the command for output and this will be the instruction that is the command for jump or branch. This is the hexadecimal equivalent of each of those. It would be DB, D3, and C3.
The first instruction is the input. Let's look at this one here, the input, and this is actually the instruction right here. This does not always mean input on our generic instruction set that we're talking about here. This command right here means input. If this is fed to the processor it causes the following things to occur. The second byte of the instruction is placed on the lower byte of the address bus, identifying the device from which data is requested. That would be memory and this would be the first byte that is going to make up the input and this would be our first count from the counter looking at memory to begin to retrieve data that will become the input. A signal on the control bus goes active to indicate an external data input is taking place. This signal will be an active low IOR, and this would be a read, from memory. Recall what is happening, we are reading from memory to the processor. The data bus is accessed and the value is placed in the accumulator. This item in memory is accessed by the data bus and it's placed in the accumulator which is one of the registers in the microprocessor. The microprocessor increments the programs counter and proceeds with the next sequential instructions stored in memory. When this command is executed, input, these four things occur.
Next one we're going to look at is the output. Now, the next instruction output, and that's right here, is the inverse of the input function. It causes the following to occur the accumulator contents are sent to the data bus with an IOW, notice this is a write. Notice the accumulator; this is the register in the microprocessor being sent to the data bus. This would be going to memory, to write data to memory. This tells the external device that data being output are now on the bus. Following this, the program counter is incremented and the next instruction is executed. This occurs when the output instruction is executed. The final one that we're going to look at in this section is the jump, sometimes it's referred to as a branch, where you're going through a sequential operation and you're branching over and going to another part of memory. The final section jump causes the program counter to be forced to a particular state rather than the next sequential address. This is the command, the instruction that says jump and then the second is the lower and the upper with … The second identifies where to jump to. The third identifies the ending address of the jump. What we've looked at here is in our representative system and we have looked at three aspects of, well three commands if you will, an instruction set. Mind you that real instruction sets will have hundreds, if not thousands of commands.
This is representative of just three of them.
Video Lectures created by Tim Fiegenbaum at North Seattle Community College.
by Gary Elinoff
by Cabe Atwell
by Robert Keim