First develop commit. Adding all existing files.

This commit is contained in:
2014-03-14 20:12:38 +01:00
parent bf68ba4560
commit 73e62547ff
441 changed files with 247478 additions and 2 deletions

14
resources/TOY/sum.toy Normal file
View File

@@ -0,0 +1,14 @@
program Sum
// Input: Sequence of non-zero integers, followed by 0000
// Output: The sum of all the integers.
// -----------------------------------------------------------------------------
// Initialize
10: 7C00 RC <- 0000 sum = 0
while (true) {
11: 8AFF read RA read a
12: CA15 if (RA == 0) pc <- 15 if (a == 0) break
13: 1CCA RC <- RC + RA sum = sum + a
14: C011 pc <- 11 }
15: 9CFF write RC write sum
16: 0000 halt