Skip to main content

Posts

Showing posts from February, 2014

sumador con carry a bcd atmel89s51

ini: mov P1,0aah Inicio: mov P1, #095h mov a, P1 mov b, P1 swap a anl b, #00001111b anl a, #00001111b c0: cjne a, #00, c1 mov r0, a mov a, b jmp fin c1: cjne a, #01, c2 mov r0, a mov a, b jmp fin c2: cjne a, #02, c3 mov r0, a mov a, b jmp fin c3: cjne a, #03, c4 mov r0, a mov a, b jmp fin c4: cjne a, #04, c5 mov r0, a mov a, b jmp fin c5: cjne a, #05, c6 mov r0, a mov a, b jmp fin c6: cjne a, #06, c7 mov r0, a mov a, b jmp fin c7: cjne a, #07, c8 mov r0, a mov a, b jmp fin c8: cjne a, #08, c9 mov r0, a mov a, b jmp fin c9: cjne a, #09, c0 mov r0, a mov a, b jmp fin jmp Inicio fin: mov b, #00 cc0: cjne a, #00, cc1 add a, r0 jmp fin2 cc1: cjne a, #01, cc2 add a, r0 jmp fin2 cc2: cjne a, #02, cc3 add a, r0 jmp fin2 cc3: cjne a, #03, cc4 add a, r0 jmp fin2 cc4: cjne a, #04, cc5 add a, r0 jmp fin2 cc5: cjne a, #05, cc6 add a, r0 jmp fi