This commit is contained in:
QkoSad
2025-07-16 13:00:37 +03:00
commit 7894b48931
806 changed files with 162532 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
@R2
M=0
@sum
M=0
(LOOP)
@1
D=M
@END
D;JEQ // if R1==0 goto end
@R0
D=M // D=R0
@sum
M=M+D // sum=sum+R0
@R1
M=M-1 //R1=R1-1
@sum
D=M
@R2
M=D
@LOOP
0;JMP
(END)
@END
0;JMP