X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=blobdiff_plain;f=Alu.hs;fp=Alu.hs;h=f26bb831b45f85526d7b9b3f23ad9e70445bc0fd;hp=78c5afcfe5504c8747aeb314d45511b4a79a8cc2;hb=d704c6a23e75f563d4816a0e01219fa7a3be266c;hpb=0082f01a853476cdcec0e73bacf8c0d4508dbec0 diff --git a/Alu.hs b/Alu.hs index 78c5afc..f26bb83 100644 --- a/Alu.hs +++ b/Alu.hs @@ -51,6 +51,10 @@ alu :: AluOp -> Bit -> Bit -> Bit alu High a b = a `hwand` b alu Low a b = a `hwor` b +salu :: AluOp -> Bit -> Bit -> () -> ((), Bit) +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, ())