X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=mTaskInterpret.icl;h=4876e935c33de2de88e3eef3de6a934ddd119a72;hb=66d5b66f8b05c529557aefde0dbb6b0d076a622e;hp=f0cddf9e26c2973313e51fffab4013aa767a7a97;hpb=0781ce1e845d7ec4bd06a39105d5d0d68835c693;p=mTask.git diff --git a/mTaskInterpret.icl b/mTaskInterpret.icl index f0cddf9..4876e93 100644 --- a/mTaskInterpret.icl +++ b/mTaskInterpret.icl @@ -229,9 +229,9 @@ instance zero BCState where zero = {freshl=[1..], freshs=[1..], sdss=[]} -toRealByteCode :: (ByteCode a b) -> (String, BCState) -toRealByteCode x -# (bc, st) = runBC x zero +toRealByteCode :: (ByteCode a b) BCState -> (String, BCState) +toRealByteCode x s +# (bc, st) = runBC x s # (bc, gtmap) = computeGotos bc 1 = (concat $ map (toString o toByteVal) (map (implGotos gtmap) bc), st) @@ -265,7 +265,7 @@ toMessages interval (bytes, st=:{sdss}) = ([MTSds i (toString b)\\(i,b)<-sdss] + toSDSUpdate :: Int Int -> [MTaskMSGSend] toSDSUpdate i v = [MTUpd i (to16bit v)] -Start = toMessages 500 $ toRealByteCode (unMain bc) +Start = toMessages 500 $ toRealByteCode (unMain bc) zero where bc = sds \x=5 In sds \y=4 In