turing.scala
changeset 182 0329bc0bceec
parent 180 8f443f2ed1f6
child 183 4cf023ee2f4c
equal deleted inserted replaced
181:4d54702229fd 182:0329bc0bceec
   208 def Mult(in1: Int, in2: Int, out: Int, tmp: Int, jump: Int) = {
   208 def Mult(in1: Int, in2: Int, out: Int, tmp: Int, jump: Int) = {
   209   val tm = Plus(in2, out, tmp, -1).shift(1, -1).adjust(-1, 0)
   209   val tm = Plus(in2, out, tmp, -1).shift(1, -1).adjust(-1, 0)
   210   Abacus(Dec(in1, jump) :: tm.p)
   210   Abacus(Dec(in1, jump) :: tm.p)
   211 }
   211 }
   212 
   212 
   213 def Mult(in1: Int, in2: Int, out: Int, tmp: Int, jump: Int) = {
       
   214   val tm = Plus(in2, out, tmp, -1).shift(1, -1).adjust(-1, 0)
       
   215   Abacus(Dec(in1, jump) :: tm.p)
       
   216 }
       
   217 
       
   218 def Expo(in1: Int, in2: Int, out: Int, tmp: Int, jump: Int) = {
   213 def Expo(in1: Int, in2: Int, out: Int, tmp: Int, jump: Int) = {
   219   val tm = Plus(in2, out, tmp, -1).shift(1, -1).adjust(-1, 0)
   214   val tm = Plus(in2, out, tmp, -1).shift(1, -1).adjust(-1, 0)
   220   Abacus(Dec(in1, jump) :: tm.p)
   215   Abacus(Dec(in1, jump) :: tm.p)
   221 }
   216 }
   222 
   217