08.05.2013 Views

Juego de instrucciones del 80C31

Juego de instrucciones del 80C31

Juego de instrucciones del 80C31

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADD A,@R0 (direccionamiento indirecto)<br />

ADD A, R7 (direccionamiento <strong>de</strong> registro)<br />

ADD A,#35H (direccionamiento inmediato)<br />

Todas las <strong>instrucciones</strong> aritméticas se ejecutan en un ciclo <strong>de</strong> máquina excepto la instrucción INC DPTR (2<br />

ciclos <strong>de</strong> máquina) y las <strong>instrucciones</strong> MUL AB y DIV AB (4 ciclos <strong>de</strong> máquina). (Notar que un ciclo <strong>de</strong><br />

máquina toma 1.085 μs si el 80C51 está operando con un cristal <strong>de</strong> 11.0592 MHz).<br />

El 80C51 brinda un direccionamiento muy versátil <strong>de</strong> su espacio <strong>de</strong> memoria interna. Cualquier localidad<br />

pue<strong>de</strong> ser incrementada o <strong>de</strong>crementada usando direccionamiento directo sin ir a través <strong>de</strong>l acumulador. Por<br />

ejemplo, si la localidad <strong>de</strong> RAM interna 7FH contiene 42H. entonces la instrucción<br />

DEC 7FH<br />

<strong>de</strong>crementa su valor, <strong>de</strong>jando 41H en la localidad 7FH.<br />

Tabla 1 Resumen <strong>de</strong> Instrucciones Aritméticas<br />

INSTR. OPERANDOS DESCRIPCION BYTES Periodos <strong>de</strong>l<br />

oscilador<br />

ADD A, Rr Aña<strong>de</strong> Registro al Acumulador 1 12<br />

ADD A, directo Aña<strong>de</strong> byte directo al Acumulador 2 12<br />

ADD A, @Ri Aña<strong>de</strong> RAM indirecta a Acumulador 1 12<br />

ADD A, #dato Aña<strong>de</strong> dato inmediato al Acumulador 2 12<br />

ADDC A,Rr Aña<strong>de</strong> Registro con Carry al Acumulador 1 12<br />

ADDC A, directo Aña<strong>de</strong> byte directo con Carry al Acumulador 2 12<br />

ADDC A, @Ri Aña<strong>de</strong> RAM indirecta con Carry al Acumul. 1 12<br />

ADDC A,#dato Aña<strong>de</strong> dato inmediato con Carry al Acumul. 2 12<br />

SUBB A,Rr Resta Registro con préstamo al Acumulador 1 12<br />

SUBB A,directo Resta byte directo con préstamo al Acumul. 2 12<br />

SUBB A, @Ri Resta RAM indirecta con préstamo al Acumul. 1 12<br />

SUBB A, #dato Resta dato inmediato con préstamo al Acumul. 2 12<br />

INC A Incrementa el Acumulador 1 12<br />

INC Rr Incrementa Registro 1 12<br />

INC directo Incrementa byte directo 2 12<br />

INC @Ri Incrementa RAM indirecta 1 12<br />

DEC A Decrementa Acumulador 1 12<br />

DEC Rr Decrementa Registro 1 12<br />

DEC directo Decrementa byte directo 2 12<br />

DEC @Ri Decrementa RAM indirecta 1 12<br />

INC DPTR Incrementa Apuntador <strong>de</strong> Datos 1 24<br />

MUL AB Multiplica AxB 1 48<br />

DIV AB Divi<strong>de</strong> A entre B 1 48<br />

DA A Ajuste Decimal al Acumulador 1 12<br />

Una <strong>de</strong> las <strong>instrucciones</strong> INC opera en el apuntador <strong>de</strong> datos <strong>de</strong> 16 bits. Ya que el apuntador <strong>de</strong> datos genera<br />

direcciones <strong>de</strong> 16 bits para memoria externa, la operación <strong>de</strong> incrementándolo en uno es muy útil.<br />

Desafortunadamente la instrucción <strong>de</strong>l <strong>de</strong>cremento <strong>de</strong>l apuntador <strong>de</strong> datos no fue implementada y requiere<br />

una secuencia <strong>de</strong> <strong>instrucciones</strong> tal como la siguiente:<br />

DEC DPL ;DECREMENTA BYTE BAJO <strong>de</strong>l DPTR<br />

MOV R7,DPL ;MOVER A R5<br />

CJNE R5,#0FFH,SK ;SI CAE A FF<br />

Profr. Salvador Saucedo 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!