Implement load method

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@575 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Laurent Vivier
2009-08-30 23:39:55 +00:00
parent 0ab0524962
commit 95a04cec0e
2 changed files with 44 additions and 0 deletions

View File

@@ -17,10 +17,28 @@
\ 7.6.2 Program download and execute
variable file-size
: !load-size file-size ! ;
: load-size file-size @ ;
: load ( "{params}<cr>" -- )
linefeed parse ( str len )
open-dev ( ihandle )
dup 0= if
drop
exit
then
dup >r
" load-base" evaluate swap ( load-base ihandle )
dup ihandle>phandle " load" rot find-method ( xt 0|1 )
if swap call-package !load-size else cr ." Cannot find load for this package" 2drop then
r> close-dev
;
: go ( -- )
." go is not yet implemented"
;
: state-valid ( -- a-addr )