added sds operators, timing and task deletion
[mTask.git] / mTaskInterpret.dcl
index fa5d1d2..0939ab4 100644 (file)
@@ -6,8 +6,12 @@ import mTask
 
 :: BC
        = BCNop
-       | BCPush String
+       | BCPush Int
        | BCPop
+       //SDS functions
+       | BCSdsStore Int
+       | BCSdsFetch Int
+       | BCSdsPublish Int
        //Unary ops
        | BCNot
        //Binary Int ops
@@ -35,8 +39,11 @@ import mTask
        | BCSerialRead
        | BCSerialParseInt
        //Pins
-       | BCAnalogRead AnalogPin
-       | BCAnalogWrite AnalogPin
+       | BCAnalogRead Pin
+       | BCAnalogWrite Pin
+       | BCDigitalRead Pin
+       | BCDigitalWrite Pin
+       | BCTest AnalogPin
 
 //:: ByteCode a p = BC (BCState -> ([BC], BCState))
 :: ByteCode a p = BC [BC]
@@ -45,7 +52,15 @@ import mTask
                a::()
        }
 
-toByteVal :: BC -> String
+class toByteCode a :: a -> [Char]
+instance toByteCode Int
+instance toByteCode Bool
+instance toByteCode Char
+instance toByteCode String
+instance toByteCode Long
+instance toByteCode Button
+
+toByteVal :: BC -> [Char]
 toReadableByteVal :: BC -> String
 
 //instance toCode Pin