diff --git a/src/macros.inc b/src/macros.inc index b30ef7f..4efaae0 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -425,20 +425,11 @@ parse_request: jge .400 ; invalid url ; %xx blocks to ascii - mov bx, word [r10 + rcx - 1] ; keep in mind it's still in LE - or rbx, 0010000000100000b - bt rbx, 6+8 - ; setc al - ; shl rax, 8 - setc ah - bt rbx, 6 - setc al - mov rdx, 39 - mul rdx ; rax * 39 -> rdx:rax - sub rbx, rax - and rbx, 0000111100001111b - shl bh, 4 - rol bx, 4 ; fix the order + mov bl, byte [r10 + rcx - 2] + mov bh, byte [r10 + rcx - 1] + sub bl, '0' + sub bh, '0' + mov bl, bl * 16 + bh jmp .loop .no_hex: diff --git a/src/main.asm b/src/main.asm index 291404d..61b873b 100644 --- a/src/main.asm +++ b/src/main.asm @@ -324,12 +324,6 @@ start: Syscall SYS_accept4, r14, NULL, NULL, SOCK_NONBLOCK cmp rax, 0 jge @f - - ; this just means another thread already handled this - cmp rax, -EAGAIN ; EWOULDBLOCK also aliases to EAGAIN on linux - je .switch_end - - error 20, "failed to accept connection" @@: push rax ; fd