From 13e755b6ead4c3f36f708e0213e23e84cb0cc545 Mon Sep 17 00:00:00 2001 From: Noah Weninger Date: Thu, 27 Oct 2022 16:49:27 -0400 Subject: Save 2 bytes in fib.asm --- entries/nwoeanhinnogaehr/fib.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'entries') diff --git a/entries/nwoeanhinnogaehr/fib.asm b/entries/nwoeanhinnogaehr/fib.asm index 26ccf11..729958f 100644 --- a/entries/nwoeanhinnogaehr/fib.asm +++ b/entries/nwoeanhinnogaehr/fib.asm @@ -25,25 +25,25 @@ entry: loop: mov eax,esi push 10 - pop ebp - push ebp - jmp format + mov ecx,esp + jmp skip dw $20 ; e_phentsize dw 1 ; e_phnum +skip: + pop ebp format: cdq div ebp inc ebx - dec esp + dec ecx or edx,'0' - mov [esp],dl + mov [ecx],dl test eax,eax jnz format print: mov al,4 - mov ecx,esp mov edx,ebx mov bl,1 int 0x80 -- cgit v1.2.3-70-g09d2