Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \ openfirmware forth boot menu
- \ boot bootmenu.of
- input-device input
- output-device output
- \ stolen from quit
- stdout @ 0= if
- false to _normal-boot install-console
- then
- true to use-console? false to ignore-output? stdout-dump sign-on state
- off abort"-str off clearlocals false to xoff? false to xoff-filter?
- decimal
- : waitkey0
- 0 swap ( -- 0 secs )
- ?do
- (cr 2 spaces i .
- get-msecs ( -- starttime )
- begin
- key? ( -- starttime keyresult )
- dup 0<> ( -- starttime keyresult flag )
- if
- swap drop leave ( starttime keyresult -- keyresult )
- else
- drop ( starttime keyresult -- starttime )
- then
- dup ( starttime -- starttime starttime )
- get-msecs ( -- starttime starttime currenttime )
- swap ( -- starttime currenttime startime )
- - 1000 ( -- starttime current-start 1000 )
- > ( -- starttime flag )
- until
- drop ( starttime -- )
- -1 +loop
- 0
- ;
- : waitkey1
- 0 swap ( -- 0 secs )
- ?do
- (cr 2 spaces i .
- get-msecs ( -- starttime )
- begin
- dup ( -- starttime starttime )
- get-msecs ( -- starttime starttime currenttime )
- swap ( -- starttime currenttime startime )
- - 1000 ( -- starttime current-start 1000 )
- > ( -- starttime flag )
- until
- drop ( starttime -- )
- key? ( -- keyresult )
- dup 0<> ( -- keyresult flag )
- if
- leave ( keyresult -- keyresult )
- else
- drop ( keyresult -- )
- then
- -1 +loop ( -- )
- 0 ( -- 0 )
- ;
- : waitkey?
- 0 swap ( -- 0 secs )
- ?do
- (cr 2 spaces i .
- get-msecs ( -- starttime )
- begin
- dup ( -- starttime starttime )
- get-msecs ( -- starttime starttime currenttime )
- swap ( -- starttime currenttime startime )
- - 1000 ( -- starttime current-start 1000 )
- > ( -- starttime flag0 )
- key? ( -- starttime flag0 keyresult )
- dup ( -- starttime flag0 keyresult keyresult )
- 0<> ( -- starttime flag0 keyresult flag1 )
- rot ( -- starttime keyresult flag1 flag0 )
- or ( -- starttime keyresult flag )
- until ( starttime keyresult -- starttime keyresult )
- nip ( starttime keyresult -- keyresult )
- ?leave
- -1 +loop
- ;
- blink-screen
- invert-screen
- erase-screen
- 12 emit
- \ menutop
- cr cr cr 10 spaces
- 15 0 do 176 emit loop .( Boot Menu ) 15 0 do 176 emit loop cr
- \ menutop
- 10 spaces .( [q]uit ) cr
- 10 spaces .( /[n]etbsd ) cr
- 10 spaces .( /netbsd.[o]ld ) cr
- 10 spaces .( [m]ac-boot ) cr
- 10 spaces .( [t]elnet ) cr
- 10 spaces .( [s]hut-down ) cr
- 10 spaces .( [R]eset OF ) cr
- \ menu bottom
- 10 spaces 41 0 do 176 emit loop cr
- begin key
- dup ascii q = if abort then
- dup ascii n = if s" boot hd:,\ofwboot.xcf hd:9,/netbsd" eval then
- dup ascii o = if s" boot hd:,\ofwboot.xcf hd:9,/netbsd.old" eval then
- dup ascii m = if mac-boot then
- dup ascii t = if s" enet:telnet,192.168.199.188 " io quit then
- dup ascii s = if shut-down then
- dup ascii r = if
- \ setenv default-router-ip 192.168.199.177
- \ setenv boot-command boot hd:,\bootmenu.of
- \ ^^^ nowork
- s" setenv default-router-ip 192.168.199.177" eval
- s" setenv boot-command boot hd:,\bootmenu.of" eval
- clear
- reset-all
- then
- drop again
- \ oooue snowdie you're lame aren't you.
- \ that's right he wont be to see this bc he'll be behind a wall
- \ can I see the other one please, cut to the flashGorden with the cool evil bitch
- \ meanwhile we can enjoy both stories
- \ anwyway it still works with the scraps
Add Comment
Please, Sign In to add comment