
// simple interrupt

// dummpy header
readport(n)
doze()
settimer0()
settimer1()
ei()
di()


cnt		// global counter

int0()
  x = readport(10)
  print(x)

// empty ISR (must be present)
int1()
int2()
int3()


// trick to do modulo
//   y = x - ((x / 256) * 256)   assume modulo 256

main()
  settimer0(200)
  cnt = 0
  while( 1 )   
    doze()	// sleep and wait for int
