summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-01-12 04:40:37 -0500
committerMalfurious <m@lfurio.us>2023-01-12 04:40:37 -0500
commitb28d784c4defed03c8f0083ba03b4bb1710ca371 (patch)
tree3d19d106db19cb87ca6267d032987dba5e3c3ae8
parent22c15764228928ed36725aa09ffeed8573372ed3 (diff)
downloadlace-b28d784c4defed03c8f0083ba03b4bb1710ca371.tar.gz
lace-b28d784c4defed03c8f0083ba03b4bb1710ca371.zip
Remove the use of ebp
Removes an unnecessary instruction. Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--lace_x86.asm7
1 files 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