Character and color cycling effect in C on DOS

As mentioned in my previous post about playing with DJGPP and GCC 10 on DOS, I have been redoing my small character and color cycling effect in text mode. The original version in JavaScript can be seen here. To understand why we can’t access video memory directly and need to use the DPMI service to create a selector to access the required real-mode segment address, please refer to section 18.4 of the DJGPP FAQ....

May 27, 2021 · 2 min

Playing with DJGPP and GCC 10 on DOS

I was recently amazed to discover that DJGPP was still being maintained, and had very recent versions of GCC and binutils available. I have not been doing any C programming on DOS in a very long time now, so I think the timing is right. There is an installation program with an interface very similar to the good old Turbo Vision, which could be helpful in case one wants to install the full environment....

May 23, 2021 · 4 min

The state of toolchains in OpenBSD

For most of the 2010s, the OpenBSD base system has been stuck with GCC 4.2.1. It was released in July 2007, imported into the OpenBSD source tree in October 2009, and became the default compiler on the amd64, i386, hppa, sparc64, socppc and macppc platforms in OpenBSD 4.8, released in November 2010. As specified in the commit message during import, this is the last version released under the GPLv2 license....

May 19, 2021 · 5 min

Speedbuilding LLVM/Clang in 2 minutes on ARM

This post is the AArch64 counterpart of my “Speedbuilding LLVM/Clang in 5 minutes” article. After publishing and sharing the previous post URL with some friends on IRC, I was asked if I wanted to try doing the same on a 160 cores ARM machine. Finding out what my answer was is left as an exercise to the reader :-) The system I’m using for this experiment is a BM.Standard.A1.160 bare-metal machine from Oracle Cloud, which has a dual-socket motherboard with two 80 cores Ampere Altra CPUs, for a total 160 cores, and 1024 GB of RAM....

May 12, 2021 · 5 min

Speedbuilding LLVM/Clang in 5 minutes

This post is a spiritual successor to my “Building LLVM on OpenBSD/loongson” article, in which I retraced my attempts to build LLVM 3.7.1 on MIPS64 in a RAM constrained environment. After reading the excellent “Make LLVM fast again”, I wanted to revisit the topic, and see how fast I could build a recent version of LLVM and Clang on modern x86 server hardware. The system I’m using for this experiment is a CCX62 instance from Hetzner, which has 48 dedicated vCPUs and 192 GB of RAM....

May 11, 2021 · 4 min

The state of toolchains in NetBSD

While FreeBSD and OpenBSD both switched to using LLVM/Clang as their base system compiler, NetBSD picked a different path and remained with GCC and binutils regardless of the license change to GPLv3. However, it doesn’t mean that the NetBSD project endorses this license, and the NetBSD Foundation’s has issued a statement about its position on the subject. Realistically, NetBSD is more or less tied to GCC, as it supports more architectures than the other BSDs, some of which will likely never be supported in LLVM....

April 9, 2021 · 3 min

OpenBSD/loongson on the Lemote Fuloong

In my article about running OpenBSD/loongson on the Lemote Yeeloong back in 2016, I mentioned looking for a Fuloong. All hope seemed lost until the Summer of 2017, when a fellow OpenBSD developer was contacted by a generous user (Thanks again, Lars!) offering to donate two Lemote Fuloong machines, and I was lucky enough to get one of those units. This machine uses the same CPU as the Yeeloong, a Loongson 2F which is a single-core MIPS-III 64-bit processor running at 800/900 MHz....

March 4, 2021 · 3 min

NetBSD on the EdgeRouter Lite

NetBSD-current now has pre-built octeon bootable images (which will appear in NetBSD 10.0) for the evbmips port, so I decided to finally give it a try. I’ve been happily running OpenBSD/octeon on my EdgeRouter Lite for a few years now, and have previously published some notes including more detail about the CPU. Contrary to the OpenBSD/octeon port which is very stable and runs SMP kernels, things are a little less polished on the NetBSD side for this platform....

January 29, 2021 · 5 min

Playing with Kore JSON API

Kore 4.0.0 has been released a few days ago, and features a brand new JSON API allowing to easily parse and serialize JSON objects. During the last couple of years, I have been using Kore for various projects, including exposing hardware sensor values over the network via very simple APIs. In this article, I would like to present a generalization of this concept and show how easy it is to expose system information with Kore....

September 7, 2020 · 2 min

Modernizing the OpenBSD console

At the beginning were text mode consoles. Traditionally, *BSD and Linux on i386 and amd64 used text mode consoles which by default provided 25 rows of 80 columns, the “80x25 mode”. This mode uses an 8x16 font stored in the VGA BIOS (which can be slightly different across vendors). OpenBSD uses the wscons(4) console framework, inherited from NetBSD. CRT monitors allowed you to set the resolution you wanted, so on bigger monitors, the 80x25 console in textmode was fairly large but not blurry....

August 31, 2020 · 4 min