/* gcc -W -Wall -o smsw smsw.c */ #include #include int main(void) { uint16_t msw; asm ("smsw %0": "=r" (msw)); printf("msw: %#hx\n", msw); return 0; }