To understand the scope of these changes, please refer to the documentation.
libstrings.fs allows the creation of 7 bits packed strings
in flash memory. Each program word holds two characters and strings
are zero terminated. An iterator allows the retrieval of one character
at a time.
w-! removes the content of W from a memory register.
-! can handle more cases.
suspend-interrupts and restore-interrupts allow interrupt bit saving
and restoring. Builtin words do use those internally. If picisr.fs is
not included, those words are noops.
rrf! and rlf! allow for variable bit shifting without resorting to
assembler.
t, allows for a single byte to be added in a table.
lshift and rshift have been further optimized.
goto is used in place of call in more places when it is possible.
v-next rememebers the variable used at v-for time. Therefore, v-next
no longer takes a variable address as parameter.
table, ftable, eetable, table> and end-table allow to create
respectively RAM, flash or EEPROM tables.
picflash.fs contains new words fcreate, f,, fallot
and fhigh!.
picforth.pdf,
picforth.txt, picforth.info and picforth.html and use the one
which most suits your needs and tastes.
table and tc: have been removed as they were inefficient
and useless in their current form.
bank0, bank1, bank2 and bank3 allow to choose the
memory bank in which next variables will be stored.
needs works the usual way.
set-stack-size allows to set the default stack size.
cmove cases are optimized.
bit-clr? until).
, is used. Note however that variables
are not automatically initialized to 0 (see README).
if) will not be normalized
if it is not needed.
bit-clr? and low? have been added.
libcmove.fs implements ANS Forth CMOVE.
spifcard.fs has been added.
/if, c-if, c-/if, /until, /while and =if have been
removed as the new optimizations makes them unnecessary.
hex>nibble and nibble>hex from libnibble.fs have been
optimized.
swap and drop after a string literal word are optimized.
=if adds a new test.
i2cloader.fs is a flash and eeprom programmer using I2C.
bit builds a name representing a particular bit at a particular address.
c, z, t0if, ...) do now push their address
as well, and must be used without any address. For example, to test
for timer 0 overflow, you must use t0if bit-set? if ... then.
bit-set, bit-clr, bit-set?, bit-toggle, high, low,
high? and toggle now use inverted parameters (push port first then
bit number). Symbols defined with bit, pin-a, pin-b, pin-c,
pin-d or pin-e can now be used in assembly code as the parameter
order is similar to the Forth one.
checker.fs has been renamed controller.fs, as the previous name
was misleading.
/and invert the top-of-stack then and the two top values.
swapf-tos exchanges nibble of top-of-stack.
lshift with a bit count greater than 3 will use a shorter code than
before.
and and /and will use bit manipulation when this is more efficient.
checker.fs is included.
libnibble.fs library converts characters to nibbles and nibbles
to characters.
- followed by if could be
incorrect.
lshift and rshift could generate incorrect code.
yield
operation crosses a 256 bytes page limit.
incfsz and decfsz will be used when it is possible.
lshift, rshift, 2* and 2/ are implemented.
invert! inverts the content of an address.
-! is implemented.
macro allows you to enter the macro definition mode, while target
gets you back to code generation.
drop followed by an integer leads to very efficient code.
+ and - have been further optimized.
:: allow efficient W register parameter passing.
>w and w> respectively pop the top-of-stack into w and push w on
the stack. They can be used to implement efficient return value handling.
or now uses bit-set instructions when it makes sense, as well as or!,
and! and /and!.
negate and invert have been optimized.
recurse is implemented the traditional way.
>input and >output change a pin direction by working on the
corresponding tris register.
include.
over was not interrupt-safe.
make interactive, you will be dropped into an interactive
mode where you can disassemble words using see, words, map and
dis.
silver.fs, contains some code that runs on a
smartcard.
eecreate and ee, manipulate EEPROM content
ee@ selected the flash instead of the EEPROM
high, low, high? and toggle are aliases for bit-set,
bit-low, bit-set? and bit-toggle intended to work on ports
Add library files libfetch.fs and libstore.fs which were forgotten in
previous versions and are used by generator.fs.
until and /until (control structures)
clrwdt (accessible from Forth)
pin-a, pin-b, pin-c, pin-d, pin-e (pin mapping)
bit-clear is renamed to bit-clr