Rylik

0x0000 · HELLO

How the machine works, written down in C.

Notes on memory, data layout and the CPU, from someone writing their own C library, a virtual tabletop and a yuri catalogue. Examples assume x86-64.

LATEST

3

Adding and Printing the Tokens

Before we get into it, some C / ASM explanations are needed.

SIMD lexer · chapter 3 · 22 min
1

Hello world

To get started, the only thing you need is an output file, which you set in the build function like this:

Getting started with stormc · chapter 1 · 5 min
2

Counting Classified Pairs

This (and probably the next too) will be a shorter post, as most of the work was already done in the first post.

SIMD lexer · chapter 2 · 18 min
1

Basic Understanding of Branchless Vectorised Parsing

To understand this better, I will be starting with a simpler form, that does not involve vectorisation.

SIMD lexer · chapter 1 · 19 min
4.1

Alignment, Data, and Memory

Like some of the previous topics, alignment has to do with how the CPU works and is less about C, but the examples are, of course, still in C.

4. Data layout · 5 min
3.6

Pointer Arithmetic

When doing pointer arithmetic with a type, the increment in bytes is always the size of that type.

3. C on the machine · 3 min
3.5

Arrays

There are only two way of having a collection or array of elements in C.

3. C on the machine · 5 min