CS 1104 Computer Systems – Discussion Forum – Unit 6 - 6.pdf - CS 1104 Computer Systems – Discussion Forum – Unit 6 In the description of the

CS 1104 Computer Systems – Discussion Forum – Unit 6 - 6.pdf

This preview shows page 1 - 2 out of 2 pages.

CS 1104 Computer Systems Discussion Forum Unit 6 In the description of the Hack machine language in chapter 4, it is stated that in well-written programs a C-instruction that may cause a jump should not contain a reference to M, and vice versa. Discuss why this should be avoided. According to the Hack computer specification M always refers to the memory word whose address is the current value of the A register (Nisan and Shocken, 2005, p. 82). This means that if A had a data memory address the value in M would be data, and if A had an address to the instruction memory the value in M would be an instruction word. Let’s take an example of a jump instruction like; @100 D;JEQ // If D=0 goto 100, For this instruction to make sense it means that the register in D ’s position sho uld contain data and not an instruction, if M was to be used instead of D this would make the behavior of the jump instruction unpredictable because it would depend on whatever value the instruction bits contain.
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Winter '16
  • mashila

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors