aboutsummaryrefslogtreecommitdiffstats
path: root/forth
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-11-10 07:37:06 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-11-10 07:37:06 -0500
commit494bd41b64a6cf9c1404a7716af40d2266771d1e (patch)
tree88fc592e89a523f0266592d506470ecc89fb8026 /forth
parent4bf01807b2ece6e8876d7c072550d6d1803eccf2 (diff)
msp430: lpm support; . uses base; expand dict size
Diffstat (limited to 'forth')
-rw-r--r--forth/msp430.fth23
1 files changed, 12 insertions, 11 deletions
diff --git a/forth/msp430.fth b/forth/msp430.fth
index 1b3ab40..ef8bf60 100644
--- a/forth/msp430.fth
+++ b/forth/msp430.fth
@@ -1,18 +1,19 @@
-: vector! 10 sys ;
-: reg! 11 sys ;
-: reg@ 12 sys ;
-: 2reg! 13 sys ;
-: 2reg@ 14 sys ;
-: sr+ 15 sys ;
-: sr- 16 sys ;
+: vector! 10 sys ;
+: byte! 11 sys ;
+: byte@ 12 sys ;
+: reg! 13 sys ;
+: reg@ 14 sys ;
+: sr+ 15 sys ;
+: sr- 16 sys ;
+: lpm-exit 17 sys ;
: reg [ ' reg@ ' reg! ] literal literal ;
-: 2reg [ ' 2reg@ ' 2reg! ] literal literal ;
+: byte [ ' byte@ ' byte! ] literal literal ;
-: set ( b r reg/wreg -- )
+: set ( b r reg/byte -- )
>r over r> execute >r rot r> | -rot execute ;
-: clear ( b r reg/wreg -- )
+: clear ( b r reg/byte -- )
>r over r> execute >r rot invert r> & -rot execute ;
-: toggle ( b r reg/wreg -- )
+: toggle ( b r reg/byte -- )
>r over r> execute >r rot r> ^ -rot execute ;