--- /dev/null
+\ Words to explore and utilize UART
+
+\ Base registers
+$40034000 constant UART0_BASE
+$40038000 constant UART1_BASE
+
+\ Offsets
+$030 constant UARTCR
+
+\ Addressed registers
+UART0_BASE UARTCR + constant UART0_CR
+
+\ *NOTE* This is getting interesting enough
+\ to put on a slide presentation, perhaps for Denhac
+
+\ ?? What is the difference between CTS and RTS?
+\ Clear to Send
+\ Ready to Send
+
+: transfer-enabeled? ( n -- flag ) ;
s" swack" store
s" feens" store ;
+\ Select a word from lexicon by index
: word. ( index -- ) WORDSIZE * lexicon + WORDSIZE TYPE ;
: word@ ( index -- addr ) WORDSIZE * lexicon + ;
+
+: char. ( word index -- ) + c@ EMIT ;
+: char@ ( word index -- char ) + c@ ;
+: char= ( char word index -- flag ) char@ = ;
+
+\ Select a random word from lexicon
: randword. ( -- addr ) 2 random word. ;
: randword@ ( -- addr ) 2 random word@ ;
+\ See if a word contains a letter
+: contains ( char addr -- flag )
+ WORDSIZE 0 DO
+ 2DUP I char= IF LEAVE ELSE THEN
+ LOOP ;
+
: check-word ( input target -- )
WORDSIZE 0 DO
- I + C@ <# # #> type
+ I + C@ <# # #> TYPE
LOOP ;
0 VARIABLE target
6 0 DO
\ Accept user input
\ Show matching letters
- LOOP
- ;
+ LOOP ;