added all example programs

This commit is contained in:
black
2025-07-09 22:42:51 +02:00
parent 03207c13db
commit 35b434ec77
10 changed files with 77 additions and 1 deletions

12
beispielprogramme/7.txt Normal file
View File

@@ -0,0 +1,12 @@
addi x1, x0, 7 # x1 = n
addi x2, x0, 0 # x2 = F ( 0 )
addi x3, x0, 1 # x3 = F ( 1 )
addi x4, x0, 0 # x4 = LoopRegister
addi x5, x0, 1 # x5 = i
loop_fib:
add x4, x2, x3 # x4 = F( i ) = F( i 2) + F( i 1)
add x2, x3, x0 # x2 = a l t e s F( i 1)
add x3, x4, x0 # x3 = neues F( i )
addi x5, x5, 1 # i++
bne x5, x1, loop_fib
# x4 enthaelt jetzt F(7) = 13