Public community profile
Daniel McCarthy's profile photo

Daniel McCarthy

@nibblebitsDragonZap administrator

Best selling author in kernel development fields, I build C compilers and kernel modules frequently. I love teaching and helping the OSDEV community

Joined August 2026 Active 5 days ago dragonzap.com
20Reputation
1Questions
1Answers
22Articles
0Approved edits

Recent activity

Daniel McCarthy’s latest published contributions across the community.

Published article · Compilers & Toolchains

Decode UTF-8 Safely in C Before Lexing Source

A compiler front end needs to track where a token came from. With UTF-8 source, one decoded value can occupy several bytes. If the lexer advances...

00
Published article · Compilers & Toolchains

Lower Short-Circuit Boolean Expressions to Branches in C

If ready() returns zero, ready() && consume() leaves consume() uncalled. A compiler emitting code for that expression needs a path around...

00
Published article · Operating Systems

Build a Single-Producer, Single-Consumer Ring Buffer in C11

A producer can have the next event ready while a consumer is still reading a previous one. A bounded ring lets the two threads pass fixed-size ev...

00
Published article · Compilers & Toolchains

Calculate C Struct Padding and Alignment in a Tiny Compiler

The members of a C struct can occupy seven bytes while the struct itself occupies twelve. To generate code for a member access such as sample.seq...

00
Published article · Architecture & Assembly

Where Does the Fifth Argument Go? Calling NASM from C on Windows x64

A C call with five integer arguments is a useful way to see the boundary between registers and the stack. Under the Windows x64 calling conventio...

00
Published article · Operating Systems

Read a Fragmented FAT16 File in C

A file's first cluster tells you where its first bytes live. The next part of the file might be several clusters away. To read a fragmented FAT16...

00
Published article · Architecture & Assembly

Build a Tiny x86-64 Assembler: Resolve Forward Jumps with Fixups

A forward jump refers to code you have not emitted yet. At the moment you write the jump instruction, you know the target's name, but its byte po...

00
Published article · Compilers & Toolchains

Resolve Names Before Generating Code: A Scoped Symbol Table

Your parser can recognize an identifier without knowing which declaration it refers to. Once nested blocks can reuse a name, that distinction bec...

00
Published article · Compilers & Toolchains

Build a Tiny Expression Parser with Precedence Climbing

A compiler front end has to answer a deceptively small question: what structure does an expression describe? Consider 7 + 2 * 5. If you combine e...

00
Published article · Operating Systems

From ELF File to Running Process: Building an ELF64 Loader for Your Kernel

From ELF File to Running Process: Building an ELF64 Loader for Your Kernel Your kernel boots. Paging works. The scheduler can switch between task...

00