diff options
| author | hachem <im@hachem.wtf> | 2026-10-12 11:41:05 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-10-12 11:41:05 +0200 |
| commit | 62636576bce8e8121a3d70f63547fae40a52f697 (patch) | |
| tree | 077dfe4f04235cce63b7abb1b05bb539232ae74a /examples/loop_sum.hdass | |
| parent | c0f000ea166a24781fcdbf23c080b203cd9b8ed7 (diff) | |
chore: refactor
Diffstat (limited to 'examples/loop_sum.hdass')
| -rw-r--r-- | examples/loop_sum.hdass | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/loop_sum.hdass b/examples/loop_sum.hdass index 130f055..7d9acdd 100644 --- a/examples/loop_sum.hdass +++ b/examples/loop_sum.hdass @@ -1,12 +1,11 @@ [entry: main] -// Sums 5 + 4 + 3 + 2 + 1 = 15 with a countdown loop, returns it as the status. const SYS_EXIT = 60 proc main { - rbx = 0 // running total - rcx = 5 // counter + rbx = 0 + rcx = 5 while .countdown rcx > 0 { |
