Skip to content

Commit

Permalink
Custom port.
Browse files Browse the repository at this point in the history
  • Loading branch information
nemasu committed Jan 24, 2019
1 parent 4b4c179 commit c447d76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions bss.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
listen_socket: resq 1
listen_port: resw 1
one_constant: resq 1
directory_path: resq 1
1 change: 0 additions & 1 deletion data.asm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
at sin_addr, dd 0 ;INADDR_ANY
iend

directory_path dq 0
request_type dq 0
request_offset dq 0
Expand Down
4 changes: 4 additions & 0 deletions debug.asm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
;
;You should have received a copy of the GNU General Public License
;along with asmttpd. If not, see <http://www.gnu.org/licenses/>.

;hint, use these with GDB
;set follow-fork-mode child

section .bss
printbuffer: resb 1024;debug

Expand Down
2 changes: 1 addition & 1 deletion main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ _start:
mov [listen_port], eax
mov rax, [rsp+16] ;Directory (first) parameter
mov [directory_path], rax
mov [directory_path], rax
; Register signal handlers ( just close all other threads by jumping to SYS_EXIT_GROUP )
mov r10, 8 ; sizeof(sigset_t) displays 128, but strace shows 8 ... so 8 it is! -_-
Expand Down

0 comments on commit c447d76

Please sign in to comment.