Microprocesador 8088

Solo disponible en BuenasTareas
  • Páginas : 7 (1738 palabras )
  • Descarga(s) : 0
  • Publicado : 9 de septiembre de 2012
Leer documento completo
Vista previa del texto

The Intel 8088 Architecture and Instruction Set
This lecture describes a subset of the 8088 architecture and instruction set. While it’s not possible to cover all the details of the 8088 in one lecture you should learn enough about the 8088 to be able to: write simple program in 8088 assembly language including: (1)transfer of 8 and 16-bit data between registers and memory using register, immediate, direct, and register indirect addressing, (2) some essential arithmetic and logic instructions on byte and 16-bit values, (3) stack push/pop, (4) input/output, (5) [un]conditional branches, (6) call/return, (7) interrupt/return, (8) essential pseudo-ops (org, db, dw). compute a physical address from segment andoffset values, describe response of 8088 to NMI, software (INT) and external (IRQ) interrupts and return from interrupts.

The original Intel 16-bit CPU was the 8086. It was designed to be backwards-compatible at the assembler level with Intel’s 8-bit CPU, the 8080. The 8088 is a version of the 8086 with an 8-bit data bus. The 8088 was used in the original IBM PC and its many clones. Laterversions of the 8086 include the i386 which extends the data and address registers to 32 bits and includes support for memory protection and virtual memory.

rupts/exceptions. There are also three segment registers (CS, DS, SS) which are used to allow the code, data and stack to be located in any three 64 kByte “segments” within a 1 megabyte (20-bit) address space as described below.Instruction Set
Data Transfer
Transfer of 8 and 16-bit data is done using the MOV instruction. Either the source or destination has to be a register. The other operand can come from another register, from memory, from immediate data (a value encoded in the instruction) or from a memory location “pointed at” by register BX. For example, if COUNT is the label of a memory location the following arepossible:


The 8088 includes has four 16-bit data registers (AX, BX, CX and DX). BX can also be used as an address register for indirect addressing. The most/least significant byte of each register can also be addressed directly (e.g. AL is the LS byte of AX, CH is MS byte of CX). ; register: move contents of BX to AX Three bits in a 16-bit program status word (PSW) MOV AX,BX are used toindicate whether the result of the previ- ; direct: move contents of AX to memory MOV COUNT,AX ous arithmetic/logical instruction was zero, negative, ; immediate: load CX with the value 240 or generated a carry. An interrupt enable bit controls MOV CX,0F0H ; register indirect: move contents of AL whether interrupt requests on the IRQ pin are recog- ; to memory location in BX nized. MOV [BX],AL Theaddress of the next instruction to be executed 16-bit registers can be pushed (SP is first decreis held in a 16-bit instruction pointer (IP) register (the mented by two and then the value stored at SP) or “program counter”). popped (the value is restored from memory at SP and Exercise: How many bytes can be addressed by a 16then SP is incremented by 2). For example:
bit value?

A 16-bit stackpointer (SP) is used to implement a stack to support subroutine calls and inter1



; push contents of AX ; restore into BX

I/O Operations
The 8088 has separate I/O and memory address spaces. Values in the I/O space are accessed with IN and OUT instructions. The port address is loaded into DX and the data is read/written to/from AL or AX:
MOV OUT IN DX,372H ; load DX withport address DX,AL ; output byte in AL to port ; 372 (hex) AX,DX ; input word to AX

stack during a CALL instruction and the contents of IP are popped by the RET instructions. For example:
CALL ... readchar: ... RET readchar

Interrupts and Exceptions

In addition to interrupts caused by external events (such as an IRQ signal), certain instructions such as a dividing by zero or the INT...
tracking img