How to get started with Golang
There are multiple resources available to learn Go. The Go Playground allows you to write code in the browser and test it, without that you need to install anything locally.
Golang Resources # Tour of Go Language specification How to Write Go Code Frequently Asked Questions (FAQ) Effective Go Wiki Go Code Review Comments Free books
An Introduction to Programming in Go GO BOOTCAMP Example code
Go by Example Learn Go in Y minutes If you want to start developing Golang more seriously, you will not get around using an IDE that offers you autocompletion and also Debugging capabilities.
Mac OS X Development Setup Guide
How to detect if your Windows application is running under Wine
In 2005, Microsoft started the anti-piracy initiative called Genuine Advantage. To be able to download from Microsoft Download Center, you would have had to pass the validation. It was the first time that Microsoft acknowledged the existence of Wine, by blocking its access to the downloads if a Wine specific registry key was found by the ActiveX control or their standalone tool.
These are some ways to detect Wine:
Registry # Check for the existence of “SOFTWARE\Wine\Wine\Config”
Creating small executables with Microsoft Visual Studio
Starting with an empty project, I will show you how to use Microsoft Visual Studio 2010 to compile your C code without the usual bloating that the compiler adds automatically. This article will just feature C code, I may extend this blog entry for usage with C++ at a later point.
In the empty workspace, create a new file called tinyexe.c with following content:
#include <windows.h> void main() { MessageBoxA(0, "Hello", "world!
Creating small executables with Qt Creator and MingW
Starting with an empty Plain C Project in Qt Creator IDE and gcc from MinGW as compiler, I will show you how to generate small binaries that are independent from MinGW dlls. At the writing of this article the app versions that I used were Qt Creator 2.6.2 with Qt 5.0.1 and gcc 4.7.2.
Replace the code of the main.c with following:
#include <windows.h> void main() { MessageBoxA(0, "Hello", "world!", MB_OK); ExitProcess(0); } Switch the build configuration in menu Projects from Debug to Release and compile the project (Ctrl + B is the default shortcut for this).
Creating the smallest possible Windows executable using assembly language
Using nasm, we can build the smallest possible native exe (without using a packer, dropper or anything like that) file that will work on all Windows versions. This is what one of the possible solution binary looks like:
The code for this little cutie:
IMAGEBASE equ 400000h BITS 32 ORG IMAGEBASE ; IMAGE_DOS_HEADER dw "MZ" ; e_magic dw 0 ; e_cblp ; IMAGE_NT_HEADERS - lowest possible start is at 0x4 Signature: dw 'PE',0 ; Signature ; IMAGE_FILE_HEADER dw 0x14c ; Machine = IMAGE_FILE_MACHINE_I386 dw 0 ; NumberOfSections user32.
Converting a DOS intro to JavaScript/HTML5
One day I had the idea of converting my fr29b DOS intro to JavaScript. Using the canvas element of HTML5, this should be an easy task and offer a good performance as well. To make the port as similar as possible, the standard VGA DOS palette should be supported. Drawing the ARGB values into the canvas can be speed up by using JavaScript typed arrays with an int32 view to write into the image data buffer.
Analysis of the 624 (Six-2-Four) packer
The 624 packer is a executable packer that got released in 1997 by Kim Holviala. It only supports DOS .com files and was targeted to compress 4kb demoscene intros but offers a decent compression of files from 1 kb to 20 kb size.
Uses LZSS (Lempel–Ziv–Storer–Szymanski) compression algorithm The assembly unpacking stub is 127 byte small Fixed length huffmann codes are used to store the length and offset of a match Packed data is stored as a bit stream.
Unpack packed DOS binaries with DOSBox debugger
29 byte DOS intro called fr29b
When going back down memory lane about my programming projects the first memory that comes up is developing software under DOS. The simple way of writing programs as .com files allowed for a lot of fun stuff like coding size competitions. Those executable files did not include any header and got executed as code starting from first byte of the file.
My favorite production of the old days is this 29 byte small intro that I developed 2001 using assembly language.