Re: picforth-1.2.3 problems
Samuel Tardieu <[email protected]> 27 Nov 2004 12:24:28 +0100
| Newsgroups | gmane.comp.lang.forth.picforth |
|---|---|
| Organization | Avian Carrier & Friends |
| Message-ID | <[email protected]> |
>>>>> "Jamie" == Jamie Lawson <[email protected]> writes: Jamie> The second is a "o2test.fs:12: Invalid memory address" error if Jamie> I try to define a flash table as in the following example. This one was a real bug, due to the introduction of checks for incorrectly nested statements. You can either apply the patch attached or pull PicForth from my Darcs repository (see WWW page). Thanks for reporting it! Sam -- Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/sam _______________________________________________ PicForth mailing list [email protected] http://lists.rfc1149.net/mailman/listinfo/picforth
patch.txt
(application/octet-stream, 1.1 KB)
Sat Nov 27 12:20:29 CET 2004 Samuel Tardieu <[email protected]> * Fix ftable bug --- picforth-1-old/picforth.fs 2004-11-27 12:22:26.000000000 +0100 +++ picforth-1-new-4/picforth.fs 2004-11-27 12:21:09.000000000 +0100 @@ -2194,7 +2194,7 @@ : element-ftable ( n -- ) retlw ; -: end-ftable ( start -- ) +: end-ftable ( DEFINITIONMARK start -- ) $ff00 and tcshere $ff00 and <> abort" flash table crosses page boundaries" unreachable meta> ; ; @@ -2222,18 +2222,19 @@ : t, ( endxt elemxt n -- endxt elemxt ) over execute ; : table> ( endxt elemxt -- endxt elemxt ) - >r depth >r source >in @ /string evaluate depth 2r> rot swap - 1- for + >r depth >r evaluate-eol depth 2r> rot swap - 1- for i 1+ roll over execute - next postpone \ + next ; : end-table ( endxt elemxt -- ) drop execute ; -: ftable ( "name" -- start endxt elemxt ) - reachable tcshere ['] end-ftable ['] element-ftable +: ftable ( "name" -- DEFINITIONMARK start endxt elemxt ) meta> :: >w + reachable tcshere return-in-w pcl ,f addwf -tcompile + ['] end-ftable ['] element-ftable ; : eetable ( "name" -- endxt elemxt )