X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Alu.hs;h=ca2dbe9180613a3db75b55843660299246f809aa;hb=acb620510e3623e8dfd979a8b732babd19086a9b;hp=3880245ff0d82a8ecee0609575a925903b90e3c1;hpb=0bc61dd521c7211ba4db643036f8517bb8bb48f4;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Alu.hs b/Alu.hs index 3880245..ca2dbe9 100644 --- a/Alu.hs +++ b/Alu.hs @@ -61,11 +61,11 @@ salu High a b s = (s, a `hwand` b) salu Low a b s = (s, a `hwor` b) type ExecState = (RegisterBankState, Bit, Bit) -exec :: (RegAddr, Bit, AluOp) -> ExecState -> (ExecState, ()) +exec :: (RegAddr, Bit, AluOp) -> ExecState -> (ExecState, (Bit)) -- Read & Exec exec (addr, Low, op) s = - (s', ()) + (s', z') where (reg_s, t, z) = s (reg_s', t') = register_bank (addr, Low, dontcare) reg_s @@ -74,7 +74,7 @@ exec (addr, Low, op) s = -- Write exec (addr, High, op) s = - (s', ()) + (s', dontcare) where (reg_s, t, z) = s (reg_s', _) = register_bank (addr, High, z) reg_s