Outputting the Manufacturer ID of a processor using CPUID with inline ASM
Use uint32_t

You have to be careful with shift operations on signed integers. In particular, right shifts on signed integers have implementation-defined behaviour, so it is hard to write portable code for it. It might work out in this case, but it is better to treat the values as unsigned integers here.

Bit shifting

While you have written a correct function to print the individual bytes of a 32-bit integer, it is a bit overkill. You can write it like so:

void print_register(uint32_t value) {
    printf("%c%c%c%c",
           (int)value,
           (int)(value &gt;&gt; 8),
           (int)(value &gt;&gt; 16),
           (int)(value &gt;&gt; 24));
}


This uses the fact that when printing a character, the value will already by truncated to 8 bits as if you would have written value &amp; 0xFF, (value &gt;&gt; 8) &amp; 0xFF, and so on. The cast to int might be necessary because the %c conversion expects an int, but int32_t might have a different size than an int on some platforms (for example, on an Arduino with an AVR CPU, int will be 16 bits).