From f5a87e3e0a3ada2384ef5ef0313dd7a71632df6c Mon Sep 17 00:00:00 2001 From: nihonium Date: Mon, 21 Mar 2022 15:41:31 +0300 Subject: [PATCH] correct jmp --- asm/solutions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asm/solutions.md b/asm/solutions.md index 2b2bede..193eda0 100644 --- a/asm/solutions.md +++ b/asm/solutions.md @@ -80,8 +80,8 @@ je end mov %al, %cl mov %ecx, %eax loop: -cmp $1, %ecx mov %eax, %edx +cmp $1, %ecx jle end dec %ecx mul %ecx @@ -98,8 +98,8 @@ je end mov %al, %cl mov %rcx, %rax loop: -cmp $1, %rcx mov %rax, %rdx +cmp $1, %rcx jle end dec %rcx mul %rcx