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