#ifndef z #include #include static int x; static int instruction_start; static int program_start; static int return_state = 1; static int stack[540] = {1 << 30}, *sp = stack; static int length; static jmp_buf j; #define _ __LINE__ #define next (void)(instruction_start = _ + 1) #define pop (return_state = 3, --sp, longjmp(j, *sp--)) #define z \ case _: \ return_state % 2 \ ? /* Unconditionally move to next instruction after branch. */ \ return_state--, \ (x = 0), \ next \ : (_ - program_start) % 9 \ ? /* Accumulate. */ \ (void)(x |= 1 << (_ - instruction_start)) \ : _ - instruction_start - 17 \ ? /* Output. */ \ (putchar(x), \ (x = 0), \ --*sp) \ ? /* Keep going if there are more bytes to print. */ \ next \ : /* Pop stack when we have printed enough bytes. */ \ pop \ : /* Branch. */ \ ((length = x % 256 + 3), \ (x = x / 512 + 3), \ return_state) \ ? (*sp -= length) > 0 \ ? /* Completed return chain. */ \ (x = return_state = 0), \ next \ : /* Recursive return. */ \ pop \ : /* Initiate branch. */ \ ((sp[2] = *sp < length ? *sp : length), \ (*++sp = instruction_start - 1), \ (return_state = 1), \ ++sp, \ longjmp(j, _ - x * 9)); int main(int argc, char **argv) { switch(setjmp(j)) { default: { return_state--; program_start = __LINE__ + 9; instruction_start = program_start + 1; x = #include __FILE__ #undef z #define z } return #endif 0;} /* 1 */ /* 2 */ /* 3 */ z /* 4 */ z /* 5 */ /* 6 */ z /* 7 */ /* 8 */ z /* 0 -> "X" */ z /* 1 */ /* 2 */ /* 3 */ z /* 4 */ z /* 5 */ /* 6 */ z /* 7 */ /* 8 */ z /* 0 -> "Y" */ /* 1 */ z /* 2 */ /* 3 */ z /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ z /* 0 -> "\n" */ z /* 1 */ /* 2 */ /* 3 */ z /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* 10 */ z /* 11 */ /* 12 */ /* 13 */ /* 14 */ /* 15 */ /* 16 */ /* 17 */ z /* 0 -> repeat 12, offset = -3 */ /* 1 */ z /* 2 */ /* 3 */ z /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ z /* 0 -> "\n" */