POPexample - 3.6 DATA TRANSFER INSTRUCTIONS 77 popped off...

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

View Full Document Right Arrow Icon
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3.6 DATA TRANSFER INSTRUCTIONS 77 popped off the stack. This is necessary to prevent the stack from changing locations halfway through the execution. Example 3.19: Figure 3.19 shows the result of executing the POPA instruction. Initially, the SP contains lFFOH. After POPA executes, the SP contains 2000H, not the value of 8877H popped off the stack. The memory data is shown in byte-swapped format, which accounts for the difference of 2 between each address. Memory I Address l /sr>>01FF033 ll: —>DI 2211 01FF2 —--> 31 4433 POPA 01FF6 —> cx EEDD POPA \ OIFFE -_: AX OOFF SP'> 02000 01FF4 FIGURE 3.19 Loading all general purpose registers with POPA The machine code for POPA is 61. ' IN Accumulator,Port (Input Byte or Word from Port). This is another instruction that was briefly introduced during our examination of Pentium addressing modes. The processor has an I/O space that is separate from its memory space. There are 65,536 pos- sible I/O ports available for use by the programmer. In almost all cases a machine designed around the Pentium would use only a handful of these ports. ...
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