
\ An example on how to use IO pins: Connect LEDs to IO pins.

$0100 constant P1IN
$0200 constant P1OUT
$0400 constant P1DIR

: blinky ( -- )
  $FFFF P1DIR io! \ Switch all pins to outputs

  begin
    16 0 do               \ Loop over all available bits
      1 i lshift P1OUT io! \ Set one bit high, all others low
      200 ms                \ Wait a bit
    loop
  key? until
;
