2005-04-26 00:35:55 -04:00
|
|
|
USING: sequences kernel math stdio strings ;
|
2005-02-18 19:09:24 -05:00
|
|
|
|
|
|
|
: lcd-digit ( digit row -- str )
|
|
|
|
{
|
|
|
|
" _ _ _ _ _ _ _ _ "
|
|
|
|
" | | | _| _| |_| |_ |_ | |_| |_| "
|
|
|
|
" |_| | |_ _| | _| |_| | |_| | "
|
2005-04-26 00:35:55 -04:00
|
|
|
} nth >r 4 * dup 4 + r> substring ;
|
2005-02-18 19:09:24 -05:00
|
|
|
|
|
|
|
: lcd-row ( num row -- )
|
2005-05-03 04:40:13 -04:00
|
|
|
swap [ CHAR: 0 - over lcd-digit write ] seq-each drop ;
|
2005-02-18 19:09:24 -05:00
|
|
|
|
|
|
|
: lcd ( num -- str )
|
|
|
|
3 [ 2dup lcd-row terpri ] repeat drop ;
|