summaryrefslogtreecommitdiff
path: root/share/examples/bootforth
diff options
context:
space:
mode:
authorAndrzej Bialecki <abial@FreeBSD.org>1998-12-31 14:06:30 +0000
committerAndrzej Bialecki <abial@FreeBSD.org>1998-12-31 14:06:30 +0000
commit21d956c544181a5f4fcddfd4cda4f05ee07e13a9 (patch)
tree320fd07f5e55561f2f747f8907139f9bdbe66797 /share/examples/bootforth
parent8f1e6e6e225b570f4a302aa5e5b9537efef9e3d0 (diff)
Notes
Diffstat (limited to 'share/examples/bootforth')
-rw-r--r--share/examples/bootforth/menu.4th26
1 files changed, 24 insertions, 2 deletions
diff --git a/share/examples/bootforth/menu.4th b/share/examples/bootforth/menu.4th
index ad98029426e9..06493c53f14b 100644
--- a/share/examples/bootforth/menu.4th
+++ b/share/examples/bootforth/menu.4th
@@ -1,7 +1,7 @@
\ Simple greeting screen, presenting basic options.
\ XXX This is far too trivial - I don't have time now to think
\ XXX about something more fancy... :-/
-\ $Id$
+\ $Id: menu.4th,v 1.1 1998/12/22 12:15:45 abial Exp $
: title
f_single
@@ -22,11 +22,33 @@
me
;
+: tkey ( d -- flag | char )
+ seconds +
+ begin 1 while
+ dup seconds u< if
+ drop
+ -1
+ exit
+ then
+ key? if
+ drop
+ key
+ exit
+ then
+ repeat
+;
+
: prompt
14 fg
20 11 at-xy
." Enter your option (1,2,3): "
- key
+ 10 tkey
+ dup 32 = if
+ drop key
+ then
+ dup 0< if
+ drop 49
+ then
dup emit
me
;