Turn a comparison into 0 or 1 with setne and movzx
Turn a flag into 0 or 1 with setne al and movzx eax, al: clear the register first only if the flags are not live. NASM 2.16, x86-64.
Short posts that solve one thing: the code, the output we got, and why it works.
Turn a flag into 0 or 1 with setne al and movzx eax, al: clear the register first only if the flags are not live. NASM 2.16, x86-64.
Configure a debug build directory with meson setup --buildtype=debug in Meson 1.6 and see which flags the buildtype expands into.
Set MODULE_LICENSE, MODULE_AUTHOR and MODULE_DESCRIPTION in a Linux 6.12 module, and see how the license decides which symbols you may use.
Convert an EBCDIC file to ASCII on z/OS UNIX with iconv -f IBM-1047 -t ISO8859-1, and why code page 1047 matters for brackets.
Change one field of an STM32 peripheral register in a single read-modify-write with MODIFY_REG, clear mask first and set mask second. STM32F4 CMSIS headers.
Print a usage line to stderr and exit with status 2 on a bad option, the convention used by grep, getopt and most Unix tools, in C.
Compile with GCC 14 and -fstack-protector-strong to put canaries in every function with a local array or address-taken local, and confirm it.
Write the simplest bytecode interpreter in C, a for loop around a switch on the opcode, and see where its single indirect branch limits you.
Divide a 12 MHz board clock to 1 Hz with a parameterised counter and a toggling register in Verilog-2005, so the output stays a registered signal.
List the CPU feature flags on Linux 6.12 with grep flags /proc/cpuinfo, then filter the long line to the few you care about, like avx2 or aes.
Create an IPv4 TCP socket with socket(AF_INET, SOCK_STREAM, 0) on Linux with glibc 2.39, check for -1, and see why the protocol argument can stay 0.
Stop GDB the moment a variable's value changes with watch, which uses a hardware watchpoint and reports the old and new value.
We send one email when a new post is published. No spam.