Skip to content
Snippets Groups Projects
Commit 9b084d6a authored by PEREZ-SIERRA ERIC's avatar PEREZ-SIERRA ERIC
Browse files

st_creer amelioré

parent 234984ef
Branches
Tags 1.1.5-sr2
No related merge requests found
......@@ -36,7 +36,7 @@ cell_mettre_bit_a1:
move $t1, $a1
li $t2, 1
sllv $t3, $t2, $t1 # (1<<i)
or $t4, $t0, $t3 # n & (1<<i)
or $t4, $t0, $t3 # n | (1<<i)
move $v0, $t4
jr $ra
......@@ -45,15 +45,13 @@ cell_mettre_bit_a0:
move $t1, $a1
li $t2, 1
sllv $t3, $t2, $t1 # (1<<i)
xor $t4, $t0, $t3 # n & (1<<i)
xor $t4, $t0, $t3 # n ^ (1<<i)
move $v0, $t4
jr $ra
st_creer:
move $t0, $a0
mul $t0, $t0, 4 # pour avoir le bon numero à allouer
#t0 contient les bits à allouer
mul $a0, $t0, $t0
move $a0, $t0
li $v0, 9
......
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