Archive for the ‘assembler’ Category

Assembler still alive and well ….

Sunday, December 9th, 2007

gretel

Today I received an email from a person interested in the Win32 IO Completion Ports example I did in assembler almost a year ago. My response to him follows at the bottom of this post. The project web site is no longer reachable so when I can find the archive of the latest code I have Ill post it here and to the MASM forum.

Assembler is a great language and while it is very granular the simplicity is something I like a lot. I’m still keen on assembler but I don’t find as much time as I would like to do it. Here is an example of Assembler using the Microsoft Macro Assembler, so you can see it is now similar to using a higher level language:

align 4
main_cleanup_io_workers proc svr:PFASTSVR, err:PDWORD

mov edx, svr
invoke PostQueuedCompletionStatus,
       [edx].FASTSVR.io_completion_port, 0, OPERATION_ENDED, NULL

mov edx, svr
invoke CloseHandle, [edx].FASTSVR.io_workers

ret
main_cleanup_io_workers endp

Why use assembler? because it is fun and there is a sense of awe in being as close to the metal as possible. The performance is also rather astonishing. In this day and age of trying to be more ‘green’ and carbon neutral there is also a satisfaction in knowing you can write programs that do more with less CPU and therefore less hardware drawing power and requiring cooling.

*The picture above is of one of my dogs, gretel. She is a pug and she makes me smile every day. I use this image as my avatar in the MASM forum.

E^Cube,

Thank you for your message and for your interest in FASTserver.

As six_l points out that particular code snippet is an example / tutorial on what is involved in using IOCP with Win32. It only accepts one connection at present, because the focus was on the IOCP API and not threading.

I did start working on a ‘framework’ that incorporated the IOCP stuff, so others could just write a DLL and not worry about all the other stuff. However, this didn’t go far, as I got busy on a lot of other things.

I’d be *very* interested in doing a project with you and others, to make a finished server with IOCP.
My only requirement would be that we don’t just focus on Win32 but Linux as well. This isn’t as hard as you might think so don’t let the multi-platform requirement put you off.

If your interested in doing this and with me leading the project then get in touch with me here or in my blog. I’ll also post about some great books to read on the subject in my blog shortly.

Keep well,

Assembly Language Programming

Sunday, February 4th, 2007

I have done a bit of assembly language programming in my win32 and linux server project. Mostly using the Gnu Assembler (GAS) and Gnu tool chain. When I started I found the best source of help and information in the MASM forums. There is a great bunch of people there.