diff options
Diffstat (limited to 'transect/ex3.k2')
-rw-r--r-- | transect/ex3.k2 | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/transect/ex3.k2 b/transect/ex3.k2 deleted file mode 100644 index 63151396..00000000 --- a/transect/ex3.k2 +++ /dev/null @@ -1,22 +0,0 @@ -# add the first 10 numbers, and return the result in the exit code - -fn main [ - var result/EBX : int - result/EBX <- copy 0 - var counter/ECX : int - counter/ECX <- copy 1 - { - compare counter/ECX, 10 - break-if > - result/EBX <- add counter/ECX - counter/ECX <- add 1 - loop - } - call exit, 1 -] - -fn exit x : int [ - code/EBX <- copy x - code/EAX <- copy 1/exit - syscall -] |