piojapotter Posted November 21, 2010 Report Share Posted November 21, 2010 hola amigos es que soy nueva y necesito que me den el codigo assembler de la siguiente sumatoria Mi Página Web esta adjuntoo!! por favor help meeeeee Link to comment Share on other sites More sharing options...
death_jp Posted November 22, 2010 Report Share Posted November 22, 2010 Mira no te entendí mucho, alguna vez me acuerdo que hice una sumatoria en assembler, y justo lo entontré. Ojalá te sirva. #make_COM# include 'emu8086.inc' ORG 100h JMP INICIO() INICIO(): CALL PTHIS DB 13, 10, 'ingrese hasta que numero quiere sumar: ', 0 CALL scan_num CMP CX,0 ;pide valor hasta que sea positivo JL INICIO() MOV SI,0 SUMATORIA(): ;funcion que hace la sumatoria ADD AX,SI INC SI ;mientras SI sea <= que el numero ingresado sigue sumando CMP SI,CX JBE SUMATORIA() TOTAL(): CALL PTHIS DB 13, 10, 'la sumatoria total es: ', 0 CALL print_num ;muestra en pantalla la suma total JMP FIN() FIN(): RET DEFINE_PTHIS DEFINE_SCAN_NUM DEFINE_PRINT_NUM DEFINE_PRINT_NUM_UNS END PD: No pude ver el enunciado ya que esta en tu plataforma virtual y no tengo acceso. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now