{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Exercise5 - 0306-250 Assembly Language Programming Fall...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 of 3 0306-250 Assembly Language Programming Fall 2009 Laboratory Exercise Five: Circular FIFO Queue Operations This exercise investigates circular FIFO queue operations using the HSC12. It requires polled serial I/O with the Freescale HCS12 MCU Application Module using the HCS12 Asynchronous Serial Communications Interface (SCI) along with the character and string I/O subroutines developed in the previous exercise. The objective of this exercise is to write subroutines to enqueue each character received from terminal input and to dequeue characters from a queue to terminal output. An assembly language program is created to test these subroutines, and it is executed on the HSC12 module. Prelab Work Following the specifications below and the notes you have taken in lecture, write subroutines for circular FIFO queue operations. (Use the queue management record structure in the class notes—including the field order and names.) You must write the subroutines so that the no registers other than CCR have changed values after return ( RTS ). (Exception: Dequeue uses B for an output parameter, so B ’s value may be different after Dequeue .) Dequeue : If the queue (whose queue record structure’s address is in X ) is not empty, dequeues a single character from the queue, returns it in B , and reports dequeue success by returning with the CCR C cleared, (i.e., 0 ); otherwise, only reports dequeue failure by returning with the CCR C bit set, (i.e., 1 ). Enqueue : If the queue (whose queue record structure’s address is in X ) is not full, enqueues the single character from B to the queue and reports enqueue
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the 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