diff options
-rw-r--r-- | lace_x86.asm | 7 |
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 |