diff options
Diffstat (limited to 'sys/boot/forth/loader.4th')
-rw-r--r-- | sys/boot/forth/loader.4th | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th index 9f40cb2..132633a 100644 --- a/sys/boot/forth/loader.4th +++ b/sys/boot/forth/loader.4th @@ -38,6 +38,30 @@ only forth definitions also support-functions 0 autoboot ; +\ ***** check-password +\ +\ If a password was defined, execute autoboot and ask for +\ password if autoboot returns. + +: check-password + password .addr @ if + 0 autoboot + false >r + begin + bell emit bell emit + ." Password: " + password .len @ read-password + dup password .len @ = if + 2dup password .addr @ password .len @ + compare 0= if r> drop true >r then + then + drop free drop + r@ + until + r> drop + then +; + \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, |