small single-threaded poll(2) webserver in x86-64 assembly
![]() algorithm: 1. call client__pollout__before_fresh_lines 2. if error, return 3. find line length 4. if no line, set POLLIN and goto 8 5. call client__pollout__line 6. if error, goto 7 7. finished with this line; goto 3 8. move the final incomplete line to the start of the client's buffer 9. return |
||
---|---|---|
.gitignore | ||
client-pollin.txt | ||
client.s | ||
clients.s | ||
constants.c | ||
main.s | ||
makefile | ||
pollfds.s | ||
readline.s | ||
readme.md | ||
server.s |
Very small HTTP server written in x86-64 assembly https://en.wikipedia.org/wiki/X86-64
- one thread
- event loop with poll(2)
- targets x86-64 linux
Why?
Why not?
x86-64 assembly resources
-
https://josemariasola.github.io/reference/assembler/Stanford%20CS107%20Guide%20to%20x86-64.pdf
-
https://userpages.cs.umbc.edu/tsimo1/CMSC313/nasmdoc/html/nasmdoc3.html
-
https://web.stanford.edu/class/cs107/resources/x86-64-reference.pdf
-
https://engineering.purdue.edu/ece264/22su/hw/ec02/resources/x64-intro.pdf