diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-25 12:10:52 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:32 -0400 |
commit | 8f2922eb1a9155b0097fb09854f267ddb17ed2dd (patch) | |
tree | d509c2422598ee1e29d52d84de8b55fbd8a8ee03 | |
parent | 81b25dbe0b11e07c023a76912f72219e34ba9c19 (diff) | |
download | roux-8f2922eb1a9155b0097fb09854f267ddb17ed2dd.tar.gz |
add source and authorship to cprime.ssa
-rw-r--r-- | lisc/test/cprime.ssa | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lisc/test/cprime.ssa b/lisc/test/cprime.ssa index dbc2f72..9b953c4 100644 --- a/lisc/test/cprime.ssa +++ b/lisc/test/cprime.ssa @@ -1,3 +1,7 @@ +# generated by Andrew Chambers' +# compiler from the C program +# following in comments + @start %v0 =l alloc8 4 %v1 =l alloc8 4 @@ -66,3 +70,34 @@ ret @end ret + +# int +# main() +# { +# int i, n, p, next, isprime; +# +# n = 5; +# p = 11; +# next = 12; +# while(n != 10001) { +# isprime = 1; +# if(next % 2 == 0) { +# isprime = 0; +# } else { +# for(i = 3; i < next; i = i + 2) { +# if(next % i == 0) { +# isprime = 0; +# break; +# } +# } +# } +# if(isprime) { +# p = next; +# n = n + 1; +# } +# next = next + 1; +# } +# if(p != 104743) +# return 1; +# return 0; +# } |