Capítulo 5: Un autor, una realidad, y el arte de la representación
5.3 La Quietud y El Movimiento en el Nuevo Cine Argentino
= 1104EH
• The stack pointer which represents theoffset from the beginning of the stack specified by the contents of SS to the top of the stack, equals 0008H. Therefore the current top of the stack is at the physical address ATOS which equal :
A
TOS= 1050H + 0008H
= 1058H
• Addresses with higher values than that top of the stack 1058H contain valid stack data.
• Addresses lower than that top of the stack not yet contain valid stack data. The last value pushed to the stack in figure 2.3.8b is BBAAH.
• Figure 2.3.8c demonstrates what happens when the PUSH AX instruction is executed.
Figure 2.3.8c Stack after execution of the PUSH AX instruction.
• AX contains the number 1234H.
• The execution of the PUSH instruction causes the stack pointer to be decremented by two but does not affect the contents of the stack segment register.
• The next location to be accessed in the stack corresponds to address 1056H. It is to this location that the value in AX is pushed.
• Notice that the MSB of AX, 12H now resides in memory address 1057H and LSB byte of AX, 34H is held in memory address 1056H.
EXAMPLE
Stack data are popped from the stack back into register from which they were pushed.
• In figure 2.3.8c The stack is shown to be in the state that resulted due to PUSH AX example, that is SP = 0006H, SS = 105H, the address at the top of the stack = 1056H and the word at the top of the stack = 1234H.
Figure 2.3.8d Instruction POP AX and POP BX are executed
• Execution of the first instruction causes the 8088 to read the value from the top of the stack and put it into the AX register as 1234H
• SP is incremented by two to give 0008H and another read operation is initiated from the stack. This second read corresponds to the POP BX instruction and it causes the value BBAAH to be loaded into BX register. SP is increment once more and now equals 000AH. Therefore the new top of the the stack is at address 105AH.
• Notice that the value that read out of 1056H and 1058H remain at these addresses but now reside at location that are above the top of the stack, therefore they no longer represent valid stack data. If new data are pushed to the stack these values are written over.
• Any number of stacks may exist in an 8088 microcomputer. A new stack can be brought in by simply changing the value in the SS register. Executing the instruction MOV SS,DX loads a new value from DS into SS. Although many stacks can exist, only one can be active at a time.
Exercise 2.3
1. How large is a memory segment in the 8088 microcomputer?
2. What register defines the beginning of the current code segment in memory?
3. How much of the 8088’s active memory is available as general-purpose data storage memory?
4. What is the address range of the general use part of the memory address space?
5. What is stored at address FFFF0H?
6. Provide an overview of the fetch and the execution of an instruction by the 8088.
7. Make a list of general-purpose data registers of the 8088
8. How are the upper and lower bytes of a data register denoted?
9. What kind of information is stored in the pointer and index register?
10. For which segment register are the contents of the pointer registers used as an offset?
11. What do SI and DI stand for?
12. Categorize each flag bit of the 8088 as either a control flag or a flag that monitors the status due to execution of an instruction.
13. Describe the function of each status flag
14. How are the status flags used by software?
15. What does TF stand for?
16. Which flag determines whether the address for a string operation is incremented or decremented.?
17. What is the word length of the 8088’s physical address?
18. What two address elements are combined to form a physical address?
19. Calculate the value of each of the physical addresses that follows. Assume all numbers as hexadecimal numbers.
a) 1000:1234 b) 0100:ABCD c) A200:12CF d) B2C0:FA12
20. If the current values in the code segment register and the instruction pointer are 0200H and 01ACH respectively, what physical address is used in the next instruction fetch?
21. If the data segment register contains the value found in problem 6, what value must be loaded into DI if it is to point to a destination operand stored in memory at address A1234H?
22. If the current values in the stack segment register and stack pointer are C000H and FF00H,respectively, what is the address of the top of the stack?
23. Show how the value EE11H from register AX would be pushed onto the top of the stack as it exists in problem 22.
2.4 INPUT/OUTPUT ADDRESS SPACE
• The 8088 has separate memory and input/output (I/O) address space.
• The I/O address space is the place where I/O interfaces, such as printer and terminal ports, are implemented.
• Figure 2.4 shows a map of 8088’s I/O address space. Notice that this address range is from 0000H to FFFFH. This represents just 64Kbyte addresses; therefore, unlike memory, I/O addresses are only 16 bits long. Each of these addresses corresponds to one byte-wide I/O port.
~ ~FFFFH ~ ~ OPEN 100H RESERVED FFH F8H F7H PAGE 0 OPEN 0000H
Figure 2.4 I/O address space
• The part of the map from address 0000H through 00FFH is referred to as page 0. • Certain of the 8088’s I/O instructions can perform only input or output data-
transfer operations to I/O device located in this part of the I/O address space. • Other I/O instructions can input or output data for devices located anywhere in
the I/O address space.
• I/O data transfers can be byte-wide or word-wide. Notice that the eight locations from address 00F8H through 00FFH are specified as reserved by Intel Corporation and should not be used.
SUMMARY
In this unit we have studied :
1. The software architecture of the 8088 and 8086 microprocessor in detail.
2. There are two processing units, each unit has dedicated functions and both operate at the same time. This parallel processing effectively makes the fetch and execution of instructions independent operations. The processing units are :
i.The bus interface unit (BIU) ii.The execution unit (EU)
3. The software architecture of the 8088/8086 microprocessors includes 13 16-bit internal registers.
4. How information such as numbers, characters, and instructions are stored in memory.
5. Segment Registers and Memory Segmentation
6. The 8088 has separate memory and input/output (I/O) address space.
The I/O address space is the place where I/O interfaces, such as printer and terminal ports, are implemented.
Exercise 2.4
1. For the 8088 microprocessors, are the input/output and memory address common or separate?
2. How large is the 8088’s I/O address?
3. What is the name given to the part of the I/O address space from address 0000H through 00FFH?