From 3b6065d5a92d68f19560b83aa810b2533f85c885 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 21 Jul 2017 07:34:48 +0000 Subject: Prepend labels with __sil_ to prevent name clashes with C functions --- examples/while.sil | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples/while.sil') diff --git a/examples/while.sil b/examples/while.sil index 49186fb..fb2778b 100644 --- a/examples/while.sil +++ b/examples/while.sil @@ -1,3 +1,9 @@ +Void sleep(Int n) { + |~ pushI_a 0 + |~ ccall sleep "I:I" + |~ pop_b 1 +} + Void print(Int n) { |~ push_a 0 |~.d 1 0 @@ -8,6 +14,7 @@ Void print(Int n) { Int loop(Int start, Int end) { while (!(start == end)) { print(start); + sleep(start); start := start + 1; } return start; -- cgit v1.2.3