From b28d784c4defed03c8f0083ba03b4bb1710ca371 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Thu, 12 Jan 2023 04:40:37 -0500 Subject: Remove the use of ebp Removes an unnecessary instruction. Signed-off-by: Malfurious --- lace_x86.asm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lace_x86.asm b/lace_x86.asm index f1076ea..8c8ed14 100644 --- a/lace_x86.asm +++ b/lace_x86.asm @@ -69,12 +69,9 @@ BITS 32 ; larger than that of the actual output file is of no consequence. _start: - mov ebp, esp - sub esp, 16 ; alloc struct sockaddr_in - xor edx, edx ; open(argv[1], 0, 0) xor ecx, ecx - mov ebx, [ebp+8] + mov ebx, [esp+8] xor eax, eax mov al, 5 int 0x80 @@ -83,6 +80,8 @@ _start: mov bl, 1 jle exit + sub esp, 16 ; alloc struct sockaddr_in + mov dl, 16 ; read(fd, sockaddr_in, sizeof(sockaddr_in)) mov ecx, esp mov ebx, eax -- cgit v1.2.3