
\ ------------------------------------------------------------------------------
\  Hello world blinky
\ ------------------------------------------------------------------------------


$20 constant   P1IN   \   [4] oled_clk [3] oled_mosi [2] oled_resn [1] oled_dc [0] oled_csn
$21 constant   P1OUT  \   ... Five GPIO wires on the OLED connector:
$22 constant   P1DIR  \   ... 1: Output 0: Input

$28 constant   P2IN   \   [7:0] Eight LEDs on the ULX3S board
$29 constant   P2OUT  \    ...
$2A constant   P2DIR  \    ... 1: Output 0: Input

$18 constant   P3IN   \   [6] RIGHT    Buttons!
                      \     [5] LEFT
                      \     [4] DOWN
                      \     [3] UP
                      \     [2] F2
                      \     [1] F1
                      \     [0] PWR, used as reset button, always reads high

: blinky ( -- )
  $FF P2DIR c!

  begin
    1 P2OUT c+!
    250 ms
  key? until

  0 P2OUT c!
;
