picforth-1.2.3 problems

Jamie Lawson <[email protected]> Fri, 26 Nov 2004 22:56:38 -0500 (EST)
Newsgroups gmane.comp.lang.forth.picforth
Message-ID <[email protected]>
Hi,

I have run across two problems using PicForth-1.2.3 on existing code
which compiles fine under prior versions.

The following minimal code results in

o2test.fs:21: Unbalanced nested statements"

There is no error with the "status c bcf" statement
removed or if one replaces c with 0 (status 0 bcf).

\ ***************************

pic16f88

variable bin0
variable cin0

: add-byte ( -- )
    ]asm
    status c bcf
    cin0  ,w movf
    bin0  ,f addwf
    asm[
;

main : main ( -- ) add-byte ;

\ **************************


The second is a "o2test.fs:12: Invalid memory address" error if I try to
define a flash table as in the following example.

\ **************************

pic16f88

require picflash.fs
require libstrings.fs

variable bin0
variable cin0

ftable some-data
  table> $02
end-table

: add-byte ( -- )
    ]asm
    status c bcf
    cin0  ,w movf
    bin0  ,f addwf
    asm[
;

main : main ( -- ) add-byte ;

\ **************************

Regards,
Jamie Lawson