Mark Cave-Ayland wrote:
Mark Cave-Ayland wrote:
Hmmm it looks to me as if the client interface seek word is expecting the arguments in a different order - I would expect ihandle>phandle to be executed on ffe4adc8, not on 0.
Referring to the IEEE-1275 spec, the arguments for seek are listed as:
IN: ihandle, pos.hi, pos.lo
whereas the comments in forth/system/ciface.fs say:
( ihandle pos_hi pos_lo -- status )
Has OpenBIOS misinterpreted the spec, in that arguments in the OF spec should read top of the stack to bottom of the stack from left to right, rather than the other way around? Then again, if this were the case, would other OpenBIOS-based client interfaces not have discovered this before?
That looks incorrect. The Client Interface part of the specification shows the arguments in backwards order (c order :-) compared to the rest of the specification. At the top of section 6.3.1, it states arguments are specified in the order arg1, ... argn. This is backwards from normal forth notation which is argn,... arg2, arg1. So it appears there is an error in forth/systems/cifaces.fs. The corresponding code in Sun's OBP (obp/os/bootprom/clientif.fth) shows:
cif: seek ( low,high ihandle -- status )