Comp. Arch. Final notes.docx

Control unit cu states t determines the address of

Info icon This preview shows pages 22–27. Sign up to view the full content.

Control Unit (CU) states - T 0 - determines the address of the next instruction to be executed (PC) - T 1 – reads the instruction from memory location into the processor- IR - T 2 – analyzes the instruction to determine the type of operation to be performed and the operand to be used - T 3 – operand address calculation - T 4 – fetches the operand from memory or reads it from I/O -> AC - T 5 – performs the operations indicated in the instruction (ALU) - T 6 – write the results into memory or out to I/O RTL Statements - micro-operations always start with SC<- 0 Subroutine - A program module that is independent of the main program - To use it the main program transfers control to the subroutine
Image of page 22

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

- It performs its function then returns control to the main program - BSA address, calls the subroutine - Subroutine returns to main with BUN indirect address (same as one in BSA) - BSA = branch and save return address Chapter 6- Basic Computer Programming Machine Language - A sequence of instructions and operands represented in binary, octal or HEX code reflecting the exact content of the computer memory. Assembly Language - A sequence of instructions where each instruction is represented with one or more symbolic codes. A compiler is necessary to translate each instruction into one binary coded instruction (machine language) to b executed by the computer - A simple code that adds two numbers
Image of page 23
- Simple code that subtracts two numbers - Rules of Assembly Language o Each line of an assembly program is arranged in 3 columns: 1. Label field may be empty or may specify a symbolic address 2. Instruction field specifies a machine instruction or a pseudo-instruction 3. Comment field may be empty or may include a comment o A symbolic address consists of one letter followed by no, one or two alphanumeric characters o The instruction field specifies 1. a memory reference instruction consisting of two or three symbols separated by spaces: opcode-symbol, symbolic-address and [I] (indirect address instruction) Pseudo-Instructions - Not a machine instruction - An instruction that provides the assembler with some type of information about a particular instruction in the assembly code
Image of page 24

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Compilation passes Multiplication
Image of page 25
Parameter passing - CALL BY VALUE: main gives the subroutine copies of the data values, such that it cannot change the originals o Before giving control to the subroutine main places data to be processed by SUB in registers or in memory then executes BSA SUB o SUB processes data and before returning control to MAIN, places the results into the microprocessor registers or memory and then executes BUN SUB I - CALL BY REFERENCE: main gives the reference to the original values (their addresses) o Pointer to memory - If you don’t want to risk losing data used call by value
Image of page 26

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 27
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '13
  • rami
  • Binary numeral system, Processor register

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern