X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fdsd-paper.git;a=blobdiff_plain;f=c%CE%BBash.lhs;h=e04ef376b9e0c733e232213555d4231f09a1cda0;hp=b5e074dcc6e0980349814d0db84ca0eb1f27b379;hb=805f559d2d578407ad5b7cdd9b6e973556969a07;hpb=26aa9c2693bfe825c0b81d54dc24d6e374c09f2a diff --git "a/c\316\273ash.lhs" "b/c\316\273ash.lhs" index b5e074d..e04ef37 100644 --- "a/c\316\273ash.lhs" +++ "b/c\316\273ash.lhs" @@ -1219,7 +1219,7 @@ output of the entire cpu. Looking at the code, the function unit is the most simple. It arranges the operand selection for the function unit. Note that it does not define the actual operation that takes place inside the function unit, -but simply accepts the (higher order) argument "op" which is a function +but simply accepts the (higher order) argument \hs{op} which is a function of two arguments that defines the operation. \begin{code} @@ -1272,9 +1272,9 @@ cpu :: CpuState -> Word -> [(Index 6, Index 6) | 4] cpu (State s) input addrs opc = (State s', out) where s' = [ fu (multiop opc) inputs (addrs!0) - , fu (+) inputs (addrs!1) - , fu (-) inputs (addrs!2) - , fu (*) inputs (addrs!3) + , fu add inputs (addrs!1) + , fu sub inputs (addrs!2) + , fu mul inputs (addrs!3) ] inputs = 0 +> (1 +> (input +> s)) out = head s'