projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
アセンブラファイルとテストの整理
[YACASL2.git]
/
as
/
FUNC
/
sum.casl
diff --git a/as/FUNC/sum.casl
b/as/FUNC/sum.casl
new file mode 100644
(file)
index 0000000..
85592c3
--- /dev/null
+++ b/
as/FUNC/sum.casl
@@ -0,0
+1,14
@@
+;;; sum.casl
+;;; 1からGR1で指定された値までの正数をすべて加算する
+SUM START
+ LAD GR2,0
+ LAD GR3,1
+SLOOP CPL GR3,GR1
+ JPL SFIN
+ ADDL GR2,GR3
+ JOV SERR
+ LAD GR3,1,GR3
+ JUMP SLOOP
+SERR LAD GR2,#FFFF
+SFIN RET
+ END