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 xxx = xxx & x;
10 return ((3 & xxx));
11 };
12
13 int main(void) {
14 int i;
15 int n;
16 int s;
17 u8 acc;
18 for (i = 0;; i++) {
19 acc = 0;
20 n = i >> 14;
21 s = i >> 17;
22 acc += g(i, 1, n, 12);
23 acc += g(i, s, n ^ i >> 13, 10);
24 acc += g(i, s / 3, n + ((i >> 11) % 3), 10);
25 acc += g(i, s / 5, 8 + n - ((i >> 10) % 3), 9);
26 putchar(acc<<4);
27 }
28 }
Imprint / Impressum