j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: laurent Date: 2009-11-22 10:04:27 +0100 (Sun, 22 Nov 2009) New Revision: 625
Modified: trunk/openbios-devel/forth/system/ciface.fs Log: Revert commit r624 (breaks ppc and sparc64 boot)
Modified: trunk/openbios-devel/forth/system/ciface.fs =================================================================== --- trunk/openbios-devel/forth/system/ciface.fs 2009-11-20 19:09:04 UTC (rev 624) +++ trunk/openbios-devel/forth/system/ciface.fs 2009-11-22 09:04:27 UTC (rev 625) @@ -189,12 +189,14 @@
: call-method ( ihandle method -- xxxx catch-result ) dup 0= if ." call of null method" -1 exit then + dup >r + dup cstrlen \ ." call-method " 2dup type cr - rot ?ihandle ['] $call-method catch if + rot ?ihandle ['] $call-method catch dup if \ not necessary an error but very useful for debugging... ." call-method " r@ dup cstrlen type ." : exception " dup . cr then - \ r> drop + r> drop ;
@@ -210,16 +212,21 @@ close-dev ;
-: read ( len addr ihandle -- actual ) - rot swap " read" call-method +: read ( ihandle addr len -- actual ) + rot dup ihandle>phandle " read" rot find-method + if swap call-package else 3drop -1 then ;
-: write ( len addr ihandle -- actual ) - rot swap " write" call-method +: write ( ihandle addr len -- actual ) + rot dup ihandle>phandle " write" rot find-method + if swap call-package else 3drop -1 then ;
-: seek ( pos_lo pos_hi ihandle -- status ) - " seek" call-method +: seek ( ihandle pos_hi pos_lo -- status ) + \ package methods uses ( pos_lo pos_hi -- status ) + swap + rot dup ihandle>phandle " seek" rot find-method + if swap call-package else 3drop -1 then ;
@@ -254,7 +261,7 @@
: interpret ( xxx cmdstring -- ??? catch-reult ) dup cstrlen - \ ." INTERPRET: --- " 2dup type + \ ." INTERPRETE: --- " 2dup type ['] evaluate catch dup if \ this is not necessary an error... ." interpret: exception " dup . ." caught" cr