gnupic: pre-announcing Forth for PIC18F chips


Previous by date: 18 Jan 2005 17:46:09 +0000 Re: gpasm preprocessor problems, Marco Jez
Next by date: 18 Jan 2005 17:46:09 +0000 Re: pre-announcing Forth for PIC18F chips, David McNab
Previous in thread: 18 Jan 2005 17:46:09 +0000 pre-announcing Forth for PIC18F chips, David McNab
Next in thread: 18 Jan 2005 17:46:09 +0000 Re: pre-announcing Forth for PIC18F chips, David McNab

Subject: RE: pre-announcing Forth for PIC18F chips
From: ####@####.####
Date: 18 Jan 2005 17:46:09 +0000
Message-Id: <F770B96908E9C64192A137817B8198BD03C9A0@wcosmb06.cos.agilent.com>

Is there any (PIC18) Forth language documents available?

Thank you!

- Mengjin -

-----Original Message-----
From: David McNab ####@####.####
Sent: Sunday, January 16, 2005 6:04 AM
To: ####@####.#### ####@####.####
Subject: pre-announcing Forth for PIC18F chips


Hi gnupic and picforth people,

This is a pre-announcement of a coming Forth compiler for the PIC18Fxxx 
chips. I've tentatively called it 'PIC18forth', but am open to 
suggestions for a better name.

PIC18forth is radically different from the PIC16Fxxx-only PicForth 
compiler. Almost nothing in common, since I've written PIC18forth from 
scratch.

Quick summary of features - love them and loathe them:

  * signed/unsigned 16-bit data cells and operators
  * software return stack
  * data stack grows up (increasing addresses), while
    return stack grows down (decreasing addresses)
  * total allocated size of data+return stacks can
    be set to anything between 16 and 1024 bytes
  * compiler is written in Python, and is very approachable
    and extensible, even for people new to the code
  * integrated into gputils
  * forth sources get compiled to relocatable assembly (.asm)
    sources, ready for gpasm and gplink
  * the generated code embeds a 16-bit forth vm (token threaded
    execution model) which executes bytecodes
  * the generated code is self-contained, and once assembled
    and linked, can be downloaded/flashed as a standalone program
  * FSR0 is usually used for data stack ptr, FSR1 usually
    used as return stack ptr, FSR2 used as general purpose
    pointer
  * full support for locals (John Hopkins syntax, data
    gets transferred from data stack to a frame on return stack
  * vm design favours code density over execution speed
  * contents of 'code .. end-code' definitions are included
    verbatim in generated assembly source (with '\' comments
    changed to ';')
  * the defining-words 'primitive .. end-primitive' can be
    used in place of 'code .. end-code', to define a word
    in assembler which will be available as a single-byte
    vm instruction - easy to add/remove primitives at will
  * maps to von Neumann memory model, with addresses <8000H
    treated as RAM addresses, and addresses>=8000H treated
    as program ROM addresses

If you're currently hacking with PIC18Fxxx chips, and are interested in 
trying out PIC18forth, please mail me and I'll put you on a list for 
pre-alpha-testers.

-- 
Cheers
David

---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####


Previous by date: 18 Jan 2005 17:46:09 +0000 Re: gpasm preprocessor problems, Marco Jez
Next by date: 18 Jan 2005 17:46:09 +0000 Re: pre-announcing Forth for PIC18F chips, David McNab
Previous in thread: 18 Jan 2005 17:46:09 +0000 pre-announcing Forth for PIC18F chips, David McNab
Next in thread: 18 Jan 2005 17:46:09 +0000 Re: pre-announcing Forth for PIC18F chips, David McNab


Powered by ezmlm-browse 0.20.