added all example programs
This commit is contained in:
9
beispielprogramme/9.txt
Normal file
9
beispielprogramme/9.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
addi x1, x0, 21 # x1 = 21
|
||||
jal x5, double # Aufruf: ra in x5
|
||||
# nach Rueckkehr enthaelt x6 das Resultat
|
||||
j end
|
||||
double:
|
||||
slli x6, x1, 1 # x6 = x1 << 1 = x1 ∗ 2
|
||||
jalr x0, 0(x5) # Ruecksprung ueber r a
|
||||
end:
|
||||
# x6 = 42
|
||||
Reference in New Issue
Block a user