Skip to content
Snippets Groups Projects
Commit b983c4dc authored by AMIRAT LYDIA's avatar AMIRAT LYDIA
Browse files

commit

parent 96a89806
No related merge requests found
......@@ -4,9 +4,9 @@
.text:
main:
<<<<<<< HEAD
li $a0,1010101
li $a1,2#stocker dans a1 le i=3, c'est a dire on met le bit d'index 3 de 0 a 1
li $a1,1#stocker dans a1 le i=3, c'est a dire on met le bit d'index 3 de 0 a 1
jal cell_lecture_bit
move $a0 $v0
li $v0 1
......@@ -58,7 +58,7 @@ cell_mettre_bit_a0:
sub_pow_10: #sub function used to init pow_10
li $a1,1
=======
li $a0 4
jal sub_pow_init
move $a0 $v1
......@@ -69,28 +69,14 @@ sub_pow_10: #sub function used to init pow_10
j Exit
cell_lecture_bit:
#the function cell_lecture_bit takes an int coded on 32 bytes,
li $t0, 31
sub $a1, $t0, $a1 # modify the value to get a shift of 31 -I digits
sllv $a0, $a0,$a1
srl $a0, $a0,31
move $v0 $a0
jr $ra
<<<<<<< HEAD
sub_pow_init:
addi $sp $sp -4
sw $ra 0($sp)
li $v1, 1
>>>>>>> 22a1ec9a0c88a023c2c5e6254e73714c653e6988
j pow_10
=======
>>>>>>> 5b1a44c68dcf856d2de5367f6bf981a9b8b3c4fc
pow_10: #function to get the 10**n for a given n
......@@ -103,9 +89,7 @@ pow_10: #function to get the 10**n for a given n
addi $a0,$a0,-1
b pow_10
continue:
lw $ra 0($sp)
jr $ra
Exit:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment