--- gforth/smartdots.fs 2012/03/09 18:56:42 1.3 +++ gforth/smartdots.fs 2012/03/27 23:06:42 1.7 @@ -1,6 +1,6 @@ \ smart .s 09mar2012py -\ Copyright (C) 1995,1998,1999,2001,2003,2006,2007,2011 Free Software Foundation, Inc. +\ Copyright (C) 2012 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -20,24 +20,26 @@ \ idea: Gerald Wodni : addr? ( addr -- flag ) - TRY @ IFERROR 2drop false nothrow ELSE drop true THEN ENDTRY ; + TRY c@ IFERROR 2drop false nothrow ELSE drop true THEN ENDTRY ; : string? ( addr u -- flag ) - TRY bounds ?DO I c@ bl < IF -1 throw THEN LOOP + TRY dup #80 u> throw bounds ?DO I c@ bl < IF -1 throw THEN LOOP IFERROR 2drop drop false nothrow ELSE true THEN ENDTRY ; : .string. ( addr u -- ) .\" s\" " type '"' emit space ; -: .addr. ( addr -- ) hex. ; +: .addr. ( addr -- ) + dup >name dup IF ." ' " .name drop ELSE drop hex. THEN ; Variable smart.s-skip : smart.s. ( n -- ) smart.s-skip @ smart.s-skip off IF drop EXIT THEN - over r> i swap >r - pick 2dup string? IF + over r> i swap >r - + dup 1 = IF false ELSE pick 2dup string? THEN IF .string. smart.s-skip on ELSE drop dup addr? IF .addr. ELSE . THEN THEN ; -' smart.s. IS .s. \ No newline at end of file +' smart.s. IS .s.