// more testing
chip "16f84";

gencode("foo1", 5);
gencode("foo2", 7);
gencode("foo3", 9);

def x = 6;

print x|=1, " should be 7";
print x&=3, " should be 3";
print x^=7, " should be 4";
print x*=2, " should be 8";
print x/=4, " should be 2";
print x<<=5," should be 64";
print x>>=1," should be 32";
print x%=5, " should be 2";

print 5;
print "5";
print str(5);

print "var=", var;
def var = 7;


code testblock {
  nop;
  goto foo2;
}

link "testblock";

code blah {
  def expand;

  movlw 1;
  foreach (expand="foo*") {
    link expand;
  }
  movlw 2;

  code inside {
    nop;
  }
}

code spok() {
  nop;
  nop;
  link "blah";
}

macro gencode(name, val) {
  code @("?"+name)(optional) {
    movlw val;
    if (val == 7) {
      nop;
    }
  }
}

def plok = "qe";

def option\ptf\Purpose = "Test";
def option\ptf\Date = now();

switch plok
{
  case "sping" { print "1"; }
  case "flong" { print "2"; }
  case "qwe"   { print "3"; }
//  default      { print "4"; }
}

movlw 1;
option\list\file = 0;
movlw 2;
option\list\line = 0;
movlw 3;
option\list\file = 1;
movlw 4;

