/****************************************************************** cflags.c displays flags NOTE: you must use the TCC comand-line compiler for this. See book. ********/ #pragma inline #include void showflags(); main() { showflags(); } void showflags() { unsigned int theflags; printf("- - - - O D I T S Z - A - P - C\n"); asm pushf asm pop [theflags] asm mov cx,16 Again: asm rol [Word ptr theflags],1 asm push cx printf("%d ", (theflags & 1)); asm pop cx asm loop Again printf("\n"); }