Keep It Simple Stupid

NYService in Assembly: a blast from the past

| comments

Hi everybody!

It’s very likely to be the last post this year. And very timely, I want to share a program that I wrote in 2006 in Assembler (aka Assembly) for Windows. It’s a very simple program that display a countdown till the New Year’s Day on the logon/lock screen.

I’ve added the sources to git and published the repo here:

The program consists of three files:

  • nyserv.asm — the sources;

  • nyserv.bat — script to build the program, kind of Makefile. If it fails, most likely you haven’t set the PATH envvar; fix: set PATH=%PATH%;d:\masm32\bin;

  • nyserv.rc — resource file.

The idea is to install a service that will have access to the lock screen desktop, and can create a window there. The program was working on Windows XP. I’m not sure if it will work on modern Windows versions due to some new system restrictions, new lock screen, and maybe something else.

To build the program, I used the MASM32 assembler 6.14. If you get it, make sure to unpack the masm32\ directory into the root of a disk, because it uses absolute paths somewhere inside (at least, that version). Also, put the directory with the project inside the unpacked masm32\ directory. The executable file takes only 7168 bytes.

I remember using the beautiful OllyDbg debugger on Windows at the time. By the way, a new version, 2.0, has been released very recently. If you work on windows, you may check it out.

I believe my favorite tutorial on Assembler for Windows is the Iczelion’s Win32 Assembly Tutorials. I read it through at least a few times. Also, a very helpful site is in Russian. Those were great times!

Happy New Year!