According to structures.fs the fields in struct instance are cell size which is 4 bytes on 32-bit systems and 8 bytes on 64-bit systems.
my-unit incorrectly assumes that the fields are always "l" (4 byte) size which causes it to return the wrong value on SPARC64. Fix the issue by updating my-unit to use the cell size to calculate its offsets.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- forth/device/package.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/forth/device/package.fs b/forth/device/package.fs index e0fd2d2..8a28263 100644 --- a/forth/device/package.fs +++ b/forth/device/package.fs @@ -197,8 +197,8 @@ defer find-dev
: my-unit ( -- phys.lo ... phys.hi ) ?my-self >in.my-unit - my-#acells tuck /l* + swap 0 ?do - /l - dup l@ swap + my-#acells tuck /n* + swap 0 ?do + /n - dup @ swap loop drop ;