Div 2 Bytes 8080

download Div 2 Bytes 8080

If you can't read please download the document

description

DIVISION DE 2 BYTES 8080

Transcript of Div 2 Bytes 8080

; *******************************************************************************; UNIVERSIDAD MAYOR DE SAN ANDRES; FACULTAD DE INGENIERIA; CARRERA DE INGENIERIA ELECTRONICA; ETN 801 - MICROPROCESADORES; ********************************************************************************; Programa: Division de 8 bits entre 8 bits por el metodo de ; rotacion a la izquierda; Procesador : 8080/8085; Univ. Ren Alonzo Choque Saire; 10/06/05; ********************************************************************************; ************** DATOS **********************************.dseg.org 0400hDEndo .byte 10 ;DividendoDSor .byte 2 ;DivisorCEnte .byte ? ;CocienteRes .byte ? ;Residuo; ************** PROGRAMA **********************************.cseg;Iniciar Variablesmvi b,8 ;contador en registro Bmvi h,0 ;Registro H = Residuolda DEndo ;Dividendo a registro Lmov l,a ;Registro L pasa a ser Dividendolda DSor ;Registro C = Divisormov c,amvi d,0 ;Registro D = Cociente y borrarlo;Acualizar ResiduoContinuar: dad h;Residuo >= Divisormov a,hcmp cjm Res