News for hackers. Stuff that matters.
Re:TCP HTTP Server written in Assembly by derefr on Saturday December 14, 2013 @10:40PM (#6908273)
Cool stuff. Really, though, this is still relying on a rather large runtime library: the physical, data-link, and network-layer drivers.

Now what'd be really awesome to see, would be one of those Operating System guides that shows you how to write an OS kernel, in assembler, that can speak HTTP. Even just limiting yourself to targeting the synthetic hardware of a VM program, it'd still be quite a feat.

Bonus points if the entire network stack has been flattened using the hand-rolled equivalent of stream-fusion. :)

Re:TCP HTTP Server written in Assembly by aortega on Sunday December 15, 2013 @12:35AM (#6908505)
Here you go:

http://www.kyllikki.org/hardware/wwwpic2/src/wwwpic2.asm.htm...

Bonus: runs on 68 bytes of ram. Not a typo, it's bytes, and it's a "complete" http+tcp/ip server.

Re:TCP HTTP Server written in Assembly by mbell on Sunday December 15, 2013 @01:40AM (#6908613)
That is just running the TCP/IP layer speaking RS232 and relying on an external IC for lower layers. It's not at all what the GP is looking for.

It should probably also be noted that a minimum TCP header, with no data attached, is 20 bytes, so to implement a 'full stack' in 68 bytes is a pretty strong indication that you're relying on off SoC memory to handle the packet buffering.

Re:TCP HTTP Server written in Assembly by aortega on Sunday December 15, 2013 @04:04AM (#6908826)
I encourage you to read the source code instead of guessing how it may work.
Re:TCP HTTP Server written in Assembly by csmuk on Sunday December 15, 2013 @03:44AM (#6908803)
Bet that handles TCP fragmentation well :)

Nice work though to whoever crammed that in a PIC.

Re:TCP HTTP Server written in Assembly by sillysaurus2 on Sunday December 15, 2013 @01:10AM (#6908567)
Awesome. Can VirtualBox or VMWare run this?
Re:TCP HTTP Server written in Assembly by cfallin on Sunday December 15, 2013 @01:27AM (#6908594)
From the first line of the source, it's a PIC (microcontroller) program, rather than something for x86 (which VirtualBox and friends emulate), so, no.

There are a few open source PIC simulators -- e.g. [1] -- and I would guess you might be able to get it running, since the link layer is SLIP over a serial port. You'd just have to wire up the simulator's serial console in the right way.

[1] http://gpsim.sourceforge.net/

Re:TCP HTTP Server written in Assembly by kragen on Sunday December 15, 2013 @11:33AM (#6909879)
Agreed, and also the filesystem. I think you may be looking for lwIP and Contiki.
Re:TCP HTTP Server written in Assembly by gwu78 on Sunday December 15, 2013 @02:27PM (#6910486)
Are you saying you'd like to see string procesing moved into the kernel?
Re:TCP HTTP Server written in Assembly by proksoup on Saturday December 14, 2013 @10:58PM (#6908315)
omfg yes!