Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- dividendo : .word 4 //r1
- divisor : .word 1 //r2
- cociente : .word 0x1234 //r3
- resto : .word 0x1235 //r4
- cero : .word 0 //r5
- .text
- .global main
- main:
- ldr r1,=dividendo
- ldr r1,[r1]
- ldr r2,=divisor
- ldr r2,[r2]
- ldr r5,=cero
- ldr r5,[r5]
- mv r4,r1
- bucle: cmp r2,r4
- bge final
- sub r4,r2
- add r3,#1
- cmp r4,r5
- beq si
- si:
- add r2,#1
- mov r4,#0
- mov r4,r1
- b final_if
- final_if
- cmp r4,r2
- blt si
- si:
- add r2,#1
- mov r4,#0
- mov r4,r1
- b final_if2
- final_if2
- final:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement