\ Digital-Analog Wandlung
DECIMAL
: WARTE    10 0 do loop ;

BIN
: INIT  
  11110000 p1 1+ cset \ p1 upper nibble is output
  00000100 p2 1+ cset \ P2.2 is ouput
  11110000 p1 cclr ;  \ uper nibble is "0" ;
HEX
: N+  
  p1 c@ \ get p1 
  dup 10 + \ increment upper nibble
  swap F and or  \ do not change lower nibble.  
  p1 c!  ( p1 c@ . ) \ put back result
  ;  
BIN
: PULS   00000100 p2 ctoggle ; \ puls for oscilloscope
DECIMAL
: WARTE  117 0 do loop ;
: DA init BEGIN puls n+ warte KEY? UNTIL ;
HEX
( finis)