NOTE: most of my recent projects are available from my GitHub page. I have included some of them in the list below.
Computer programming has been my main interest since I was eleven, and I have written a lot of code since then. I present a selection of programs here. Programming is at the same time a science, an art, and a necessary evil when you want to get something done. Consequently, some other projects that involve programming are located in the other sections of my website.
This list looks rather short for a decade worth of programming, because most of my projects are not particularly interesting. Some have been cancelled due to lack of interest or practical difficulties, and many experiments simply failed.
All information provided on my site is in the public domain, except when explicitly stated otherwise. This is mostly for practical reasons, as anyone trying to deal with licensing issues in free software projects should be able to appreciate.
Project | Year | Description |
---|---|---|
chinese-names | 2023 | A Python library to parse and guess the gender of Chinese names. |
colorFOOL | 2022 | A programming language combining the best(?) of Chuck Moore's colorForth and my previous FOOL (see below) languages. A truly unique experience. |
snail | 2021 | Microcoded serial CPU implemented with discrete TTL chips. |
cpu7 | 2019 | CPU and Forth system for the iCE40-HX8K FPGA board. |
seqdecode | 2019 | C code for decoding convolutional error-correcting codes with sequential decoding. |
wen | 2013 | A programming language based on classical Chinese. |
The System | 2009 | A small operating system (featuring multitasking, a thread-safe memory allocator, IPv4 support via SLIP) for AVR microcontrollers. |
barcode | 2009 | A program to read barcodes (of my own format) using your computer's webcam, as well as generating them. |
neoload | 2008 | A C64/C128 program to load file system images from a tape to a GeoRAM/NeoRAM memory expansion unit. Features relatively advanced (by early 1980s standards) error correction/detection. |
Astrophotography | 2008 | I have a small reflecting telescope, which I put a webcam CMOS image sensor into and took some pictures. They required some heavy processing in order to make out any details, and I wrote a program to do this for me. |
AES-256 | 2008 | In case you ever need a modern, strong encryption algorithm for your C64 (or any other 6502-family system), here is a fairly efficient implementation. Code size is 752 bytes, and another kB of RAM is used run-time for lookup tables. Speed is about 10318 cycles/block, or 81 cycles/bit. |
factor | 2007 | A program to find the prime factors of an integer, including an implementation of the Multiple Polynomial Quadratic Sieve. Parts contributed by Andreas Launila. Released under the GNU General Public license. |
kandie | 2007 | A handwriting recognition system, using input from a graphics tablet (via XInput). The basics were written as a homework task about Hidden Markov Models, but I added support for whole-word (or whole-character, in the case of ideographic languages) identification. |
Elliptic Curve DSA | 2007 | A simple implementation of ecdsa over a 256-bit prime field, using GNU MP. It's not very fast, vulnerable to all sorts of timing attacks, doesn't use point compression, and doesn't validate inputs. |
muhash | 2007 | A series of hash functions and a pseudo-random number generator designed for 8-bit systems, and the 6502 in particular. |
simplecrypt | 2007 | A small cryptography library, with AES (128, 192 and 256) and SHA-256. Although a Makefile which produces a library is provided, the primary goal with this little project is to have some reasonably efficient and portable basic cryptographic functions to include in your programs when necessary, without bothering with external libraries. |
Hamming codes | 2006 | A Hamming code (29, 24) decoder/encoder in 6502 assembly language. Intended for use in a C64/C128 tape loader, but can be used independently. |
SAT solver | 2006 | Simple SAT solver in SML. "Not non-trivial," as the SML community would put it. |
Thai | 2006 | A very small functional language, with compilers. A two-tuple is the only datatype avaliable. |
netcat IRC | 2006 | An extremely simple IRC client using the netcat tool for networking. |
ipirc | 2005 | An IP (v4 and v6) tunnel over IRC. Simply let all nodes of a network connect to a particular IRC channel, and send your packets (base64 encoded) there. Tested with protocols such as SSH and HTTP, and even though the latency is several seconds and the transfer rate in the order of 100 bytes/second, being connected to the IPv6 internet through IRC is a very exciting experience. Requires Linux and Ruby. |
EdForth | 2005 | A really minimalistic Forth compiler and interpreter for Linux, intended to demonstrate the basics of a Forth on a slightly more modern architecture. |
NASA picture conversion | 2005 | A couple of quick Ruby hacks to convert the formats used by NASA's Voyager and Galileo space probes to post-70s formats. Requires Ruby and Imagemagick. Also includes a decompressor written by NASA or some associated organization and modified by me (removed some VMS-specific code). As a work by the US government you shouldn't run into any trouble using it, but if you're really paranoid you might want to read up on international copyright law before using this. |
Happy Birthday, enthusi! | 2005 | This is a birthday demo for Martin Wendt, a true C64 fanatic. It's a multicolour brainfuck interpreter, using the screen RAM for data and code, meaning that you see the code execute and modify itself! The code is for the Acme cross-assembler. A PRG binary is also available. |
Lanton's Ant | 2005 | An implementation of Langton's Ant for C64. My first real 6502 program, and I personally think it's quite nice. Martin Wendt converted the code from the native TASM assembler to the Acme cross-assembler, so that you can watch this program in a C64 emulator as well. |
The F System | 2004 | A small operating system for i386 written in assembly language and Forth. One feature taken from the Forth world is that it compiles a large part of itself on boot. Some of the code base is taken from earlier attempts at PC operating systems I wrote around the age of 15, and the overall quality isn't that great. Once upon a time the user base for F was an entire user, but this declined rapidly after disk corruption and other bugs surfaced. |
BrainFuck compilers | 2004 | The BrainFuck programming language is extremely simple, which makes it a popular language to implement, preferably using very few instructions or an odd programming language (such as BrainFuck itself). I have written one of the smallest 16-bit compilers for it. |
FOOL | 2004 | Forth On One Line (FOOL) is one of the more compact languages in existance, that isn't entirely useless. Advantages include speed of compiling, small size, and funny looks from other people. |
Minix compilers | 2003 | These are some simple compilers (for BrainFuck and Le, the latter being a language based on smileys) I wrote to test low-level programming in Minix. Sorry, they only compile code targeted for Minix, although retargeting them should be a trivial task. The actual compilers are written in ANSI C. Download minix-bf.tar or le.tar here. |
TForth | 2002 | A small Forth compiler for DOS. Works well and comes with documentation and a number of example programs. Note that one user (or should I say the user?) has reported strange crashes, which however never occured during my testing on several different systems (a 286 with DOS 3.3, a 386 with DOS 6.22, a Pentium with Windows 98, a Pentium 4 with Linux and DOSemu). |
Primula | 2002 | An attemt to write a simple x86 operating system. Later I based the F system (see the main projects page) on Primula. Neither is particularly useful, but I list it here because I spent some effort on it back then. |
MTV | 2002 | A stack-based virtual machine for AVR microcontrollers. Develped on an STK500 board, it supports using DataFlash for code and data. There's also a Forth cross-compiler and a native compiler/interpreter for the VM. Although most of the applications were never tested on the AVR (I got lazy and wrote an emulator), the VM itself could still be pretty useful, with features like the DataFlash support (using both of its SRAM buffers, so performance is acceptable). |
MSA | 2000 | A very simple DOS assembler, with a NASM-like syntax. It works and some example programs are included, but there is no macro support. Tested on a 286 with 640kB of RAM. |
Europe at War | 2000 | This is a game I wrote in QBASIC a number of years ago, because I thought it had been too long since my last BASIC project. There's a Swedish and an English version (the latter was translated by Mattias Arreborn). Your goal is to conquer Europe with the mighty army of Sweden. |
Cnasica | 2000 | An interpreter for a BASIC-like language. Probably the first somewhat useable programming language interpreter I wrote. Originally written for DOS, but I've later ported it to Linux. |
Game4 | 1999 | This was my first larger assembly language project, a pretty simple tile-based adventure game. Features a level editor and some nice graphics. Trivia: my sister (who was 8 or 9 years old at the time) is responsible for some of the levels. Written with TASM for DOS. |