aboutsummaryrefslogtreecommitdiff
path: root/forth/forth/avr/bit-test.fs
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-09-29 01:02:00 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-09-29 01:02:00 +0200
commit79cabd5b1c8bcd9f50dc49e77776e713a57dff48 (patch)
tree6eb73857e9c174610839291cf05a02d77fc82b8c /forth/forth/avr/bit-test.fs
parent247df3bb9d4c89d4e5ff18dcc23ba1c9532f28c0 (diff)
parent110a6411bae421260476eacf6173897c1d1f4b8a (diff)
Merge branch 'master' of dim13.org:elegoo
Diffstat (limited to 'forth/forth/avr/bit-test.fs')
-rw-r--r--forth/forth/avr/bit-test.fs58
1 files changed, 58 insertions, 0 deletions
diff --git a/forth/forth/avr/bit-test.fs b/forth/forth/avr/bit-test.fs
new file mode 100644
index 0000000..cdfdcea
--- /dev/null
+++ b/forth/forth/avr/bit-test.fs
@@ -0,0 +1,58 @@
+\ *********************************************************************
+\ *
+\ Filename: bit-test.txt *
+\ Date: 06.01.2015 *
+\ FF Version: 5.0 *
+\ MCU: Atmega *
+\ Copyright: Mikael Nordman *
+\ Author: Mikael Nordman *
+\ *********************************************************************
+\ FlashForth is licensed acording to the GNU General Public License*
+\ *********************************************************************
+\ Test words for manipulating bits in ram and in IO registers
+\ Needs bit.txt
+-bittest
+marker -bittest
+
+\ BIT addressable IO register
+\ $20 - $3f
+$22 constant porta
+
+\ IN OUT addressable IO register
+$4a constant gpior1
+
+\ LDS STS addressable IO register
+$124 constant tcnt5l
+
+porta 2 bit0: porta2off
+porta 2 bit1: porta2on
+porta 2 bit?: porta2?
+
+gpior1 0 bit0: gpio0off
+gpior1 0 bit1: gpio0on
+gpior1 0 bit?: gpio0?
+
+tcnt5l 7 bit0: tcnt5l7off
+tcnt5l 7 bit1: tcnt5l7on
+tcnt5l 7 bit?: tcnt5l7?
+
+-1 porta c!
+porta2off porta c@ . porta2? .
+porta2on porta c@ . porta2? .
+0 porta c!
+porta2on porta c@ . porta2? .
+porta2off porta c@ . porta2? .
+
+-1 gpior1 c!
+gpio0off gpior1 c@ . gpio0? .
+gpio0on gpior1 c@ . gpio0? .
+0 gpior1 c!
+gpio0off gpior1 c@ . gpio0? .
+gpio0on gpior1 c@ . gpio0? .
+0 gpior1 c!
+-1 tcnt5l c!
+tcnt5l7off tcnt5l c@ . tcnt5l7? .
+tcnt5l7on tcnt5l c@ . tcnt5l7? .
+0 tcnt5l c!
+tcnt5l7on tcnt5l c@ . tcnt5l7? .
+tcnt5l7off tcnt5l c@ . tcnt5l7? .