From 8b76d35b0a045e0a3277be422513b938ef33dcce Mon Sep 17 00:00:00 2001 From: hachem Date: Wed, 9 Sep 2026 05:14:44 +0200 Subject: feat: fasm backend --- examples/loop_sum.hdass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/loop_sum.hdass') diff --git a/examples/loop_sum.hdass b/examples/loop_sum.hdass index 2427b17..130f055 100644 --- a/examples/loop_sum.hdass +++ b/examples/loop_sum.hdass @@ -8,11 +8,11 @@ proc main rbx = 0 // running total rcx = 5 // counter -loop: - rbx += rcx - rcx -= 1 - if rcx != 0 - goto loop + while .countdown rcx > 0 + { + rbx += rcx + rcx -= 1 + } rdi = rbx rax = SYS_EXIT -- cgit v1.3