From: Matthijs Kooijman Date: Thu, 19 Feb 2009 15:14:52 +0000 (+0100) Subject: Let the exec function output something. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=commitdiff_plain;h=acb620510e3623e8dfd979a8b732babd19086a9b Let the exec function output something. --- 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