Feed

Low-Level Programming

Low-level programming discussions covering assembly, memory management, systems programming, and hardware interaction from developer communities.

Articles from the last 30 days

Defeating a 40-year-old copy protection dongle
01Sunday, February 1, 2026

Defeating a 40-year-old copy protection dongle

In a unique case of software archaeology, a researcher successfully bypassed hardware-based copy protection for a legacy RPG (Report Program Generator) II compiler used by an accounting firm. The firm was incredibly still running Windows 98 in 2026 to execute 40-year-old software requiring a physical dongle on a parallel port. By using the Reko disassembler to analyze 16-bit x86 executables, the researcher identified a specific 0x90-byte code segment responsible for dongle communication. Analysis revealed that the routine returned a constant value in the BX register regardless of input. Through brute-force testing within DosBox, the constant was identified as 7606h. Applying a four-byte assembly patch (MOV BX, 7606; RETF) successfully emulated the dongle presence, allowing the software—and its compiler—to run on modern emulators without the original hardware.

Atari 2600 Raiders of the Lost Ark source code completely disassembled and reverse engineered. Every line fully commented.
02Monday, February 9, 2026

Atari 2600 Raiders of the Lost Ark source code completely disassembled and reverse engineered. Every line fully commented.

This repository provides a comprehensive reverse-engineered source code analysis of the 1982 Atari 2600 classic, Raiders of the Lost Ark, originally designed by Howard Scott Warshaw. The analysis detail includes the disassembly of 8KB of ROM code across two banks, explaining how the 6502 assembly manages the hardware limitations of the Atari Television Interface Adaptor (TIA). Key technical features explored include the bank-switching mechanism using zero-page RAM trampolines, the division of game logic across TV signal phases (VSYNC, VBLANK, Kernel, and Overscan), and the specific rendering kernels for rooms like the Thieves' Den and the Ark Room. The project also documents unique programming tricks such as using bit 7 of sprite data for inline TIA register modification and the logic behind inventory management, collision detection, and the scoring system.

Sources:/r/programming702 pts
Zig Libc
03Saturday, January 31, 2026

Zig Libc

The Zig programming language's devlog for 2026 highlights a significant architectural transition involving the zig libc subproject. Led by Andrew Kelley and contributors, the project aims to replace vendored C source files with Zig standard library wrappers. This initiative has already removed approximately 250 C source files, moving toward a goal of total independence from third-party C dependencies. Key benefits of this transition include improved compilation speeds, reduced binary sizes due to better static linking, and a smaller installation footprint. Furthermore, by sharing a Zig Compilation Unit (ZCU) instead of using separate static archives, the compiler can perform optimizations across the libc boundary similar to front-end Link-Time Optimization (LTO). This shift also opens future possibilities for resource leak detection and integrating libc I/O calls directly into event loops like io_uring.

BarraCUDA Open-source CUDA compiler targeting AMD GPUs
04Monday, February 16, 2026

BarraCUDA Open-source CUDA compiler targeting AMD GPUs

BarraCUDA is an open-source, C99-based CUDA compiler that targets AMD GFX11 (RDNA 3) GPUs without LLVM dependencies. It compiles .cu files directly into ELF binaries, featuring a custom intermediate representation and a hand-written instruction selector. Supporting core CUDA features like atomics and warp intrinsics, it offers a lightweight alternative to traditional GPU toolchains.

Sources:Hacker News415 pts
How Michael Abrash doubled Quake framerate
05Saturday, February 14, 2026

How Michael Abrash doubled Quake framerate

A performance analysis of the 1999 Quake source code confirms John Carmack's claim that hand-crafted assembly nearly doubles the engine's speed on Pentium processors. By leveraging Michael Abrash's optimizations—such as FPU pipelining, self-modifying code, and overlapping integer and floating-point operations—the framerate increased from 22.7 to 42.2 fps.

SectorC: A C Compiler in 512 bytes
06Saturday, February 7, 2026

SectorC: A C Compiler in 512 bytes

SectorC is a minimalist C compiler written in x86-16 assembly that fits within an incredible 512-byte boot sector. Despite its extreme size constraints, it supports a functional subset of C including variables, functions, systems-level inline machine code, and control flow like if and while statements. To achieve this, the developer utilized a simplified 'Barely C' syntax where space-delimited tokens allow the compiler to use a simple atoi function as a makeshift hash for keywords and identifiers. This clever design minimizes the need for a complex lexer and symbol table, effectively trading potential hash collisions for extreme portability. The project demonstrates that complex software can be reduced to its bare essentials through creative engineering, enabling the creation of sine-wave animations and audio programs directly from a boot sector.

Sources:Hacker News345 pts
I Ported Coreboot to the ThinkPad X270
07Friday, February 20, 2026

I Ported Coreboot to the ThinkPad X270

The author successfully ported Coreboot and Libreboot to the Lenovo ThinkPad X270 Kaby Lake model. The process involved dumping BIOS images, repairing a damaged capacitor on the motherboard, and troubleshooting PCIe allocation issues by comparing schematics between the X270 and X280. The project ultimately achieved full NVMe and WiFi functionality.

Sources:Hacker News277 pts
I put a real-time 3D shader on the Game Boy Color
08Sunday, February 8, 2026

I put a real-time 3D shader on the Game Boy Color

This technical deep-dive chronicles the creation of a real-time 3D shader for the Game Boy Color, a feat achieved despite the console's lack of native 3D hardware and fixed-point math support. The developer explains how normal maps were utilized alongside spherical coordinates and logarithmic lookup tables to circumvent the SM83 CPU's inability to perform multiplication. By converting operations into log-space, the shader calculates Lambert lighting efficiently. The project employs advanced techniques like self-modifying code to optimize the hot path, saving significant CPU cycles. Additionally, the author reflects on a failed attempt to use AI for assembly generation, noting that while LLMs handle high-level scripting, they struggle with niche, highly-optimized low-level code and introduce subtle logical errors.

Sources:Hacker News264 pts
Simplifying Vulkan One Subsystem at a Time
10Thursday, February 5, 2026

Simplifying Vulkan One Subsystem at a Time

The Vulkan Working Group is addressing the 'extension explosion problem' by transitioning from incremental API updates to comprehensive subsystem replacements. Historically, numerous extensions increased complexity and created portability challenges for developers. To solve this, the group introduced VK_EXT_descriptor_heap, a total overhaul that replaces the traditional descriptor set subsystem. This new approach treats descriptors as memory and data rather than opaque objects, offering a more streamlined, console-like experience. While currently released as an EXT to gather community feedback, it aims for future core specification inclusion. This strategy reflects a broader commitment to simplifying the Vulkan API and improving cross-vendor compatibility through heavy industry collaboration and developer-focused roadmaps.

Sources:Hacker News245 pts
UEFI Bindings for JavaScript
11Monday, February 9, 2026

UEFI Bindings for JavaScript

Promethee is an innovative proof-of-concept project that provides UEFI Bindings for JavaScript, allowing developers to write bootloaders using high-level scripting logic. The core architecture uses the Duktape engine to execute JavaScript within a freestanding environment, requiring only minimal libc stubs. The project works by loading a script.js file from the boot volume and executing it through UEFI services. Users can interact with low-level systems such as the GraphicsOutput protocol to perform operations like video filling directly from JavaScript. This bridge between low-level firmware and high-level programming simplifies experimental bootloader development, utilizing C for the bridge and TypeScript for type definitions. It demonstrates the flexibility of modern script engines when stripped of their standard OS dependencies.

Sources:Hacker News239 pts
MenuetOS – a GUI OS that boots from a single floppy disk
12Tuesday, February 3, 2026

MenuetOS – a GUI OS that boots from a single floppy disk

MenuetOS is a unique operating system written entirely in 64-bit and 32-bit assembly language. Its primary design goal is to eliminate excessive layers between the kernel and applications, resulting in high speed and compact code. Unlike many modern systems, MenuetOS is not based on UNIX or POSIX standards. It features a responsive Graphical User Interface, pre-emptive multitasking, and SMP support for up to 32 processors. The system is remarkably efficient, fitting onto a single floppy disk while offering high-resolution graphics, USB 2.0 support, and a complete TCP/IP stack. Recent updates have introduced a partial Linux layer and improved multimedia capabilities.

Sources:Hacker News153 pts
Index, Count, Offset, Size
13Monday, February 16, 2026

Index, Count, Offset, Size

The article discusses improving code reliability through strict naming conventions for indexing, especially in low-level languages like Zig and Rust. By consistently using Index, Count, Offset, and Size, developers can visually detect off-by-one errors and memory bugs. This approach complements static typing by making logical errors obvious through variable suffixes and consistent name lengths.

Sources:Hacker News135 pts
Minimal x86 Kernel Zig
14Tuesday, February 17, 2026

Minimal x86 Kernel Zig

A minimal bare-metal kernel written in Zig that boots on x86 via the Multiboot 1 protocol. It features zero assembly files, using Zig's cross-compilation capabilities to target x86-freestanding-none. The kernel manages memory-mapped I/O for VGA text-mode display and demonstrates low-level system programming without external dependencies or complex bootloader installations.

Sources:Hacker News125 pts
Coding Tricks Used in the C64 Game Seawolves
15Thursday, February 19, 2026

Coding Tricks Used in the C64 Game Seawolves

Developer analysis of the Commodore 64 game Seawolves, detailing nine advanced assembly programming techniques. It covers synchronizing NMIs and IRQs, real-time 'splite' rendering for torpedoes, and bit-shifting for animations. These demoscene-inspired methods optimize the limited VIC-II and CIA hardware for complex visual effects and efficient sprite management.

Sources:Hacker News122 pts
Windows NT/OS2 Design Workbook
16Tuesday, February 10, 2026

Windows NT/OS2 Design Workbook

A comprehensive collection of design documents and specifications for the Windows NT operating system. It features detailed technical papers on kernel architecture, memory management, I/O systems, and internal mechanisms like IRP, APC, and LPC. These documents provide historical and technical insight into the foundational structures of the Windows executive and system services.

Sources:Hacker News121 pts
Reverse Engineering the Prom for the SGI O2
17Sunday, February 8, 2026

Reverse Engineering the Prom for the SGI O2

This technical article details the comprehensive reverse engineering of the Silicon Graphics O2 (IP32) PROM firmware to enable CPU upgrades that were previously blocked for decades. The author developed the ip32prom-decompiler, a tool that translates the binary firmware into modifiable, reassemblable MIPS assembly code. The process involved identifying custom 'SHDR' section headers, deciphering checksum algorithms, and visualizing the binary structure to distinguish code from data. By mapping out the entry points and memory regions like kseg0, and handling virtual subsections copied to RAM, the author successfully produced a bit-identical source representation. This work provides the necessary foundation for modifying the PROM to support 900 MHz RM7900 CPUs, effectively bypassing the need for original SGI source code or support.

Sources:Hacker News100 pts
A few CPU hardware bugs
18Thursday, February 5, 2026

A few CPU hardware bugs

This article explores various hardware and firmware defects in processors, ranging from cosmetic errors to critical pipeline bugs. The author highlights instances where Intel processors returned misspelled CPUID strings, such as 'GenuineIotel' and 'ore i5', likely due to human error or bit-flip issues. While these don't impact performance, they reflect quality control lapses. More significantly, the author discusses a critical hardware bug in the ITE Tech IT81202 RISC-V embedded controller, where instructions following a multiplication operation fail to execute correctly. This flaw necessitates a performance-degrading software workaround to ensure system stability, illustrating the inherent complexity and risks involved in chip design for specialized embedded environments.

Sources:Hacker News100 pts
Hare 0.26.0 released
19Friday, February 13, 2026

Hare 0.26.0 released

Hare 0.26.0 has been released, introducing significant language features like loop values with for..else, support for DragonflyBSD, and explicit error ignoring using underscores. It also adds nameless struct fields for padding and @undefined for uninitialized variables. Joe Finney joins as a new maintainer alongside Drew DeVault.

Sources:Lobsters63 pts
You don't need free lists
20Friday, February 20, 2026

You don't need free lists

The article explores replacing free-lists in pool-like data structures with multi-level bit pools. This approach uses bitmasks and the `tzcnt` instruction for O(1) slot allocation. Benefits include minimal memory overhead (1 bit per slot), improved memory locality by allocating lower indices first, and better suitability for SIMD and AoSoA architectures.

Sources:Lobsters52 pts