Browse Source

adding shift commands to arduinoSPS, TinySPS

Wilfried Klaas 6 years ago
parent
commit
c8dda0b251
1 changed files with 7 additions and 1 deletions
  1. 7 1
      usps.pas

+ 7 - 1
usps.pas

@@ -84,7 +84,7 @@ const
   A_CALC_LIST_AT: array[0..15] of string = ('', 'A=A+1',
     'A=A-1', 'A=A+B', 'A=A-B', 'A=A*B', 'A=A/B',
     'A=A And B', 'A=A Or B', 'A=A Xor B', 'A=Not A', 'A=A % B',
-    'A=A+16*B', 'A = B - A', '', '');
+    'A=A+16*B', 'A = B - A', 'A=A SHR 1', 'A=A SHL 1');
   PAGE_LIST_H: array[0..15] of string = ('Page 0', 'Page 1',
     'Page 2', 'Page 3', 'Page 4', 'Page 5', 'Page 6',
     'Page 7', '', '', '', '', '', '', '', '');
@@ -944,6 +944,12 @@ begin
     13: case version of
         ATTiny84, Arduino: a := b - a;
       end;
+    14: case version of
+        ATTiny84, Arduino: a := a SHR 1;
+      end;
+    15: case version of
+        ATTiny84, Arduino: a := a SHL 1;
+      end;
   end;
   case version of
     Holtek, ATMega8: a := a and 15;