Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Knowledge and How-To (https://thetfp.com/tfp/tilted-knowledge-how/)
-   -   Processor fun! Machine instructions! (https://thetfp.com/tfp/tilted-knowledge-how/141025-processor-fun-machine-instructions.html)

Jozrael 10-01-2008 04:39 PM

Processor fun! Machine instructions!
 
Ok, so I'm learning about processors. I want to make sure this series of steps for this machine instruction is correct:

Add LOCA,R0 where LOCA is an address in main memory and R0 is a register.

1: Transfer the contents of the program control (PC) to memory address register (MAR).
2: Send a read signal to main memory for the instruction and store it in the memory data register (MDR).
3: Transfer the contents of the MDR to the instruction register (IR).

Ok...so now we have the instruction loaded into IR. Time to execute it.

4: Transfer the address of LOCA to the MAR (is this copied from the IR?).
5: Send a read signal to main memory for data at LOCA and store it in the MDR.
6: Transfer the contents of the MDR to the arithmetic and logic unit (ALU).

Ok, the hard operand is retrieved. Now for the second one.

7: Transfer the contents of R0 to the ALU.

Now the ALU has its operands...do I send it something to tell it that ADD is the operation to be performed? I think I'm missing a step here. In any case, ALU does its thing, not really a step, and then:

8: Transfer the contents of the ALU to R0.
9: Transfer PC+1 (I think?) to MAR.
10: Send a read signal to main memory and store the contents in MDR.
11: Transfer the contents of MDR to the IR.

And that's slightly over one machine instruction since it's also incremented the IR for the next instruction.

Am I missing anything?


All times are GMT -8. The time now is 01:30 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73