[PicForth] Re: picforth-1.2.3 problems

Jamie Lawson jlawson at ces.uoguelph.ca
Sat Nov 27 15:11:35 CET 2004



On Sat, 27 Nov 2004, Samuel Tardieu wrote:

> 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
>

Hi Sam,

Thanks for the response. Is this a new requirement? I have not had
problems with this before. I assume the stack referred to is the stack in
GForth not PicForth. Is this correct?

I see how it follows the PicForth convention but, when in assembler mode,
I don't think the syntax should be differ from the standards published
in the PIC data sheets (apart from the postfix notation).

As I tend to resort to assembler, probably more often than necessary, I
am concerned about backwards compatibility with existing code.
Although, now that I understand; I can certainly adapt.

I would appreciate any comments.

Regards,
Jamie Lawson


More information about the PicForth mailing list