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