HW5_S10 - mov esi,0 index 0 in buffer L1 xor buffer[esi,KEY...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CmpE 102 – Homework 5 (Spring 2010) – due Mar. 22 Chapter 6 Problems 1. Write code for the following conditional jump conditions: a. Jumps to label L1 if either bit 4, 5, or 6 is set in the BL register. b. Jumps to label L1 if bits 4, 5, and 6 are all set in the BL register. c. Jumps to label L2 if AL has even parity. d. Jumps to label L3 if EAX is negative. e. Jumps to label L4 if the expression (EBX – ECX) is greater than zero 2. Analysis the following code, and determine its function and justify sizes of equates and variables shown in the code: KEY = 239 ; can be any byte value BUFMAX = 128 .data buffer BYTE BUFMAX+1 DUP(0) bufSize DWORD BUFMAX .code mov ecx,bufSize ; loop counter
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mov esi,0 ; index 0 in buffer L1: xor buffer[esi],KEY ; translate a byte inc esi ; point to next byte loop L1 3. Rewrite the assembly code from Section 6.5.3 so it is functionally equivalent, but uses fewer instructions. 4. Write code to make the following two changes to the CPU Flags register: a. Change the ZF from 1 to 0. b. Set the TF bit. Questions Related to the Sample Project Code: 5. Describe all the hardware that pertains to the code and draw a functional block diagram of the hardware. 6. Why was it necessary to start the Hexadecimal-to-BCD Table on a page boundary in RAM? 7. What is the purpose of “stub” routines used in embedded code?...
View Full Document

{[ 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