anchor.diff:  PB2 constant ZDA
   PB4 constant ZCL
   PB8 constant RST
  +PA8 constant BTN
   
   : ez80-8MHz ( -- )
     7200 XIN pwm-init   \ first set up pwm correctly
  
positive.code:   9996 XIN pwm ;      \ finally, set the pwm to still toggle
  
  : z ( -- )
    ZDA ios!  OMODE-OD ZDA io-mode!
    ZCL ios!  OMODE-PP ZCL io-mode!
    RST ios!  OMODE-OD RST io-mode!
    ez80-8MHz ;
  
  : delay 10 0 do loop ;
  
negative.code:     stop
    again ;
  
  : t  \ start USART2 pass-through task
    cr uart-irq-init 19200 uart-baud
    [: uart-irq-handler uart-task wake ;] irq-usart2 !
    multitask uart-reader&
    c
    begin
      key? if key uart-emit then
      \ break out of terminal loop when button is pressed
    BTN io@ 0= until
    uart-task remove ;
  