This is an implementation of the Onramp Virtual Machine directly in x86_64 machine code.
The resulting executable is about 5 kB. This includes the ELF header, the string table and other constants, and the code. Much of the code (10%-20%) is padding between functions to give them fixed addresses and make them editable. A significant portion is spent on setting up raw non-blocking input which is solely for the purpose of running Doom. We even install signal handlers to restore the terminal state properly.
Not counting padding, the program code consists of about 850 x86_64 instructions. That includes full error-checking, bounds-checking, friendly error messages, non-blocking input, terminal setup, signal handlers, etc. This is all that is required to implement a complete Onramp VM. A VM that omits error checks and raw input could probably reduce this by 30% or more.
The full hexadecimal source code is about 3000 lines including whitespace and comments. It contains more comments than code.