#define inline #include #include #include #include #pragma clang diagnostic ignored "-Wreturn-type" typedef char* string; // opcodes! // 0: halt // 1: nop // 2: mov // 3: movi // 4: add // 5: addi // 6: sub // 7: subi // 8: moveq -> moves m[B] to m[A] if m[Q] == 0 // program counter is m[0] // Q is set to the previous A in memory // error handling for unknown ops #define W 0 // clang-format off #define J while #define S 1<<20 #define H !K-- m[S]={0},c,N,Q,E; ppu(){E=1;_Pragma("omp parallel")J(E){_Pragma("omp single")N=m[m[0]],c=m[0],m[0]+=++N*4;int i;_Pragma("omp for")for(i=0;i