Re: Build your own Forth for microchip PIC (Episode 839)
- From: byron@upstairs.(none) (Byron Jeff)
- Date: Sun, 24 Jun 2007 12:45:59 -0500
In article <1sxqxtculdr4m$.1ly164xd3gegw$.dlg@xxxxxxxxxx>,
Coos Haak <chforth@xxxxxxxxx> wrote:
Op Sat, 23 Jun 2007 18:25:20 -0500 schreef none:
I've asked about a primitive kernel to implement Forth upon. Instead of
looking at existing examples maybe a better approach is to post a
description of my current 16F NPCI bytecode and discuss.
minus ; 4 - minus ( n1 n2 -- n2 - n1 )
I think you have the stack reversed from the normal Forth notation
( n1 n2 -- n1-n2 )
Push n1 first, than n2, and subtracht n2 from n1.
You are correct. My NPCI compiler converts infix to postfix
using a operator stack. Operands pass through unmodified.
I misunderstood where the TOS is. I just finished reading the gforth
manual. TOS is furthest to the right, not the left. Got it.
BTW the primitives do implement the proper stack effect. I get a D- for
listing them incorrectly. Sorry.
BAJ
.
- References:
- Build your own Forth for microchip PIC (Episode 839)
- From: none
- Re: Build your own Forth for microchip PIC (Episode 839)
- From: Coos Haak
- Build your own Forth for microchip PIC (Episode 839)
- Prev by Date: Re: Gforth and gcc "progress"
- Next by Date: Re: Build your own Forth for Microchip PIC (Episode 837)
- Previous by thread: Re: Build your own Forth for microchip PIC (Episode 839)
- Next by thread: Onyx?
- Index(es):
Relevant Pages
|