anchor.diff:     {ok,CPU#cpu{t = ((bnot T) band 16#3ffff)
                 }};
   
  -
   % 16#14  +   plus
   exec_impl(?PLUS,CPU) ->
      T  = CPU#cpu.t band 16#3ffff,   
      S  = CPU#cpu.s band 16#3ffff,
      C  = CPU#cpu.carry,
  -   R  = case (CPU#cpu.p band 16#0200) of
  - 	     16#0200 ->
  -	 	 (S + T + C) band 16#3ffff;
  +   case (CPU#cpu.p band 16#0200) of
  +        16#0200 ->
  +    	    X    = (S + T + C) band 16#3ffff,
  +            CX   = (X band 16#3ffff) bsr 17,
  +            CPUX = pop(ds,CPU,X),
  +            {ok,CPUX#cpu{carry = CX
  +                        }};
    
  -             _else ->
  -                 (S + T) band 16#3ffff
  -             end,
  -
  -   {ok,pop(ds,CPU,R)};
  +        _else ->
  +            X = (S + T) band 16#3ffff,
  +            {ok,pop(ds,CPU,X)} 
  +         end;
   
   
   % 16#15  and
  
positive.code:                      [{ram,0,1},{a,0},{t,2},{s,3},{ds,1,[3,4,5,6,7,8,9,10]}]}
                     ]).
  
  -define(TEST_MULTIPLY,[{?MULTIPLY,[{a,0},{t,0}],[{a,16#00000},{t,0}]},
                         {?MULTIPLY,[{a,0},{t,1}],[{a,16#20000},{t,0}]},
                         {?MULTIPLY,[{a,0},{t,2}],[{a,16#00000},{t,1}]},
  
negative.code:                    {?NOT,[{t,16#3ffff}],[{t,16#00000}]}
                   ]).
  
  -define(TEST_PLUS,[ {?PLUS,
                       [{p,16#0000},{t,1},{s,2},{ds,0,[3,4,5,6,7,8,9,10]},{carry,0}],
                       [{p,16#0000},{t,3},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,0}]},
  
                      {?PLUS,
                       [{p,16#0000},{t,16#3ffff},{s,16#3fffe},{ds,0,[3,4,5,6,7,8,9,10]},{carry,0}],
                       [{p,16#0000},{t,16#3fffd},{s,3},       {ds,1,[3,4,5,6,7,8,9,10]}]},
  
                      {?PLUS,
                       [{p,16#0000},{t,16#3ffff},{s,1},{ds,0,[3,4,5,6,7,8,9,10]},{carry,0}],
                       [{p,16#0000},{t,16#00000},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,0}]},
  
                      {?PLUS,
                       [{p,16#0000},{t,1},{s,2},{ds,0,[3,4,5,6,7,8,9,10]},{carry,1}],
                       [{p,16#0000},{t,3},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,1}]},
  
                      {?PLUS,
                       [{p,16#0000},{t,16#3ffff},{s,16#3fffe},{ds,0,[3,4,5,6,7,8,9,10]},{carry,1}],
                       [{p,16#0000},{t,16#3fffd},{s,3},       {ds,1,[3,4,5,6,7,8,9,10]},{carry,1}]},
  
                      {?PLUS,
                       [{p,16#0000},{t,16#3ffff},{s,1},{ds,0,[3,4,5,6,7,8,9,10]},{carry,1}],
                       [{p,16#0000},{t,16#00000},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,1}]},
  
                      {?PLUS,
                       [{p,16#0200},{t,1},{s,2},{ds,0,[3,4,5,6,7,8,9,10]},{carry,0}],
                       [{p,16#0200},{t,3},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,0}]},
  
                      {?PLUS,
                       [{p,16#0200},{t,16#3ffff},{s,16#3fffe},{ds,0,[3,4,5,6,7,8,9,10]},{carry,0}],
                       [{p,16#0200},{t,16#3fffd},{s,3},       {ds,1,[3,4,5,6,7,8,9,10]},{carry,1}]},
  
                      {?PLUS,
                       [{p,16#0200},{t,16#3ffff},{s,1},{ds,0,[3,4,5,6,7,8,9,10]},{carry,0}],
                       [{p,16#0200},{t,16#00000},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,0}]},
  
                      {?PLUS,
                       [{p,16#0200},{t,1},{s,2},{ds,0,[3,4,5,6,7,8,9,10]},{carry,1}],
                       [{p,16#0200},{t,4},{s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,0}]},
  
                      {?PLUS,
                       [{p,16#0200},{t,16#3ffff},{s,16#3fffe},{ds,0,[3,4,5,6,7,8,9,10]},{carry,1}],
                       [{p,16#0200},{t,16#3fffe},{s,3},       {ds,1,[3,4,5,6,7,8,9,10]},{carry,1}]},
  
                      {?PLUS,
                       [{p,16#0200},{t,16#3ffff},{s,1},{ds,0,[3,4,5,6,7,8,9,10]},{carry,1}],
                       [{p,16#0200},{t,1},       {s,3},{ds,1,[3,4,5,6,7,8,9,10]},{carry,0}]}
                    ]).
  
  -define(TEST_AND,[ {?AND,
  