new version
[Chiptunes.git] / foo.c
CommitLineData
61fab018
TG
1#include <stdio.h>
2typedef unsigned char u8;
26c08307 3int g(int i, u8 x, u8 t, u8 o) {
e7afc044
TG
4 u8 xxx = (3 & i >> 16 ? "BY}6YB6%" : "Qj}6jQ6%")[t % 8];
5 return ((3 & x & (i * (xxx + 51) >> o)));
61fab018
TG
6};
7
8int main(void) {
fe9a76e4
TG
9 int i;
10 int n;
11 int s;
ab6fe4c2 12 u8 acc;
fe9a76e4 13 for (i = 0;; i++) {
ab6fe4c2 14 acc = 0;
fe9a76e4
TG
15 n = i >> 14;
16 s = i >> 17;
ab6fe4c2
TG
17 acc += g(i, 1, n, 12);
18 acc += g(i, s, n ^ i >> 13, 10);
19 acc += g(i, s / 3, n + ((i >> 11) % 3), 10);
20 acc += g(i, s / 5, 8 + n - ((i >> 10) % 3), 9);
21 putchar(acc<<4);
fe9a76e4 22 }
61fab018 23}
Imprint / Impressum