Re: picforth-1.2.3 problems

Samuel Tardieu <[email protected]> 27 Nov 2004 12:00:58 +0100
Newsgroups gmane.comp.lang.forth.picforth
Organization Avian Carrier & Friends
Message-ID <[email protected]>
>>>>> "Jamie" == Jamie Lawson <[email protected]> writes:

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

New checks have been added in PicForth.

Jamie> The following minimal code results in
Jamie> o2test.fs:21: Unbalanced nested statements"

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

This is expected. "c", as other constants designating bits in
registers, expands into two integers: the register address and the
bit. In this case, "c" puts "status" and "0" on the stack.

If you write

  status c bcf

it is the same thing as

  status status 0 bcf

which leaves an extra integer on the stack, hence the "unbalanced"
message.

You have to use

  c bcf

 Sam
-- 
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/sam