new version
authorTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 00:43:51 +0000 (01:43 +0100)
committerTobias Girstmair <tobi@isticktoit.net>
Thu, 4 Mar 2021 00:43:51 +0000 (01:43 +0100)
bsv.c

diff --git a/bsv.c b/bsv.c
index 672ecf5bbff1782c63b7b23c22dca7b9735e7b23..22070e3619a325926f453439e4269df0ba0d90d8 100644 (file)
--- a/bsv.c
+++ b/bsv.c
@@ -22,7 +22,7 @@ void main(void){
        // clear i2
        for(;;) {
                u8 sample;
-               u8 n = i2<<2 | i1>>6;
+               u8 n = i2<<2 | i1>>6; //MEM
                // mov n, i2
                // sl n
                // sl n
@@ -32,9 +32,6 @@ void main(void){
                // sr acc
                // sr acc
                // or n, acc
-               u8 s = i2>>1;
-               // mov s, i2
-               // sr s
 
                g(n);
                //^TODO
@@ -51,11 +48,12 @@ void main(void){
                g(tmp);
                //^TODO
                } //tmp
-               acc >>= 2;
+               acc >>= 1;
                // sr acc
+               acc &= i2;
+               // and acc, i2
+               acc >>= 1;
                // sr acc
-               acc &= s;
-               // and acc, s
                acc &= 3;
                // and acc, 3
                sample += acc;
@@ -70,7 +68,7 @@ void main(void){
                acc >>= 2;
                // sr acc
                // sr acc
-               { u8 tmp1 = s/3;
+               { u8 tmp1 = i2/6;
                acc &= tmp1;
                //^TODO
                } //tmp1
@@ -87,7 +85,7 @@ void main(void){
                g(tmp2);
                } //tmp2
                acc >>= 1;
-               { u8 tmp1 = s/5;
+               { u8 tmp1 = i2/10;
                acc &= tmp1;
                } //tmp1
                acc &= 3;
Imprint / Impressum