
Write a Boot Sector That Prints Hello in 16-Bit Real Mode
Write a 512-byte boot sector in NASM that sets up segments and a stack, prints a string with BIOS int 0x10 and ends with the 0xAA55 signature, line by line.
Tag
445 posts

Write a 512-byte boot sector in NASM that sets up segments and a stack, prints a string with BIOS int 0x10 and ends with the 0xAA55 signature, line by line.

Create FreeRTOS software timers with xTimerCreate: the five arguments, one-shot versus auto-reload, why a new timer is dormant and how to restart a one-shot.

Start a program from C with CreateProcessW, quote the command line correctly, redirect its output to a file, wait with a timeout and avoid handle leaks.

Handle a Pico button press with an RP2040 GPIO interrupt: the event mask, the callback signature, one shared callback for several pins, and a flag for main.

Decode an SPI flash ID read and an I2C TMP102 temperature read by hand from logic analyser captures, with sample points, start, stop and ACK bits explained.

Learn the three-step loop at the heart of every emulator: fetch an opcode, decode its fields, execute its effect, with a complete C example you can follow.

Fuzzing feeds a program mutated inputs and watches for crashes. Coverage feedback keeps inputs that reach new code, so an impossible search becomes short.

Learn why 1 KB can mean 1000 or 1024 bytes, how KiB and MiB settle it, and why a 1 TB drive shows up as 931 GiB, with a C program and numfmt examples.

Learn the difference between FFmpeg hardware decoding with -hwaccel and hardware encoding with a codec such as h264_nvenc, and why mixing them costs copies.

Understand big-endian network byte order, why x86 and ARM hosts differ, and when to call htons, htonl, ntohs and ntohl in C socket code.

Turn a serial C loop into a multithreaded one with one OpenMP pragma, then learn which loops are safe to split and which ones silently give wrong answers.

Follow one C function through Clang, LLVM IR, the optimizer and the code generator, and see what each stage produces and which tool lets you run it alone.