To understand the scope of these changes, please refer to the README
file.
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 rename 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