Ron Sutcliffe wrote: »
The demo files are not in the zip file.
No problems, I wrote a couple of test files and they worked like charm,
prof_braino wrote: »
Whoa! Loopy ROCKS!
I'm going to put this up on the propforth site too, if thats ok
Dave Hein wrote: »
Loopy, let us know when we're allowed to comment. I have a few suggestions.
pfth no longer requires SimpleIDE to build. I have included the propeller-load program and the pfth binary executable so that pfth can be installed without having to build it. The source files are included for information purposes only.
Brian Riley wrote: »
How ... what word(s) are used to save user created words like 'saveforth' in PF or 'BACKUP' in Tachyon.
Dave Hein wrote: »
Wait, I thought Forth was a write-only language.
pfth currently doesn't have a save command.
it will only be useful as long as you don't upgrade.
..save the "see" versions of words as source file. These could then be recompiled back to executable code.
mindrobots wrote: »
I think the "saving" behavior problwm you describe is typical to Forth implementations.
Forth should allow you to start with a bare kernel and then add words for your application and then saving the image so that you can reload the kernel PLUS your application without having to go through the process of adding/including/pasting the source .f files back every time you reset.
A version upgrade usually invalidates the kernel you have if you want to move to the update. Then you would start from the base kernel again and add in your application words and save the image with the new kernel and your application words.
A save across versions is difficult for the reasons you mention. The biggest need is to be able to save your working image across resets, crashes, etc. not blending your working dictionary into a new version's dictionary.
Interpreter Words Math and Logical Words Memory Access
----------------- ---------------------- -------------
evaluate + !
execute - @
find * c!
word / c@
create and Console I/O
_lit or -----------
; xor emit
: < key
Program Termination >
------------------- lshift Utility
abort rshift -------
quit Registers bye
Stack Operations #tib
: immediate 1 last @ C + c! ;
: \ 100 word drop ; immediate
\ The above lines implement the immediate and \ words.
\ It is assumed that the base is currently set for hex mode.
\ DEFINE CELL SIZE
: cellsize 4 ;
: cellmask 3 ;
\ BASIC STACK WORDS
: dup 0 pick ;
: rot 2 roll ;
: swap 1 roll ;
: over 1 pick ;
: 2dup over over ;
: 2drop drop drop ;
: 2swap 3 roll 3 roll ;
: 2over 3 pick 3 pick ;
\ DEFINE BASIC WORD BUILDERS
: here dp @ ;
: allot dp @ + dp ! ;
: source tib #tib @ ;
: , here ! cellsize allot ;
: compile, , ;
: ' 20 word find 0 = 0 = and ;
: _does r> dup >r 8 + last @ 8 + ! ;
: _setjmp A last @ C + c! ;
: >body D + dup c@ + 4 + FFFFFFFC and ;
: literal 0 , , ; immediate
last @ >body dup @ swap 4 + ! \ Patch in address of _lit
: postpone ' , ; immediate
: ['] ' postpone literal ; immediate
: [compile] ' postpone literal ['] , , ; immediate
: does> [compile] _does [compile] exit ; immediate
\ CONDITIONAL EXECUTION AND LOOPING
: _jmp r> 4 + @ >r ; _setjmp
: _jz r> 4 + dup @ rot 0 = 1 + pick >r drop drop ; _setjmp
: if ['] _jz , here >r 4 allot ; immediate
: else ['] _jmp , here r> ! here >r 4 allot ; immediate
: then here 4 - r> ! ; immediate
Loopy Byteloose wrote: »
Regarding 'the bare Forth Kernel',
Is the bare Kernel, code without Lexicon, or code with a minimal lexicon? (Or worst of all, can it be both?)