aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/forth2012/facility
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/lib/forth2012/facility')
-rw-r--r--amforth-6.5/common/lib/forth2012/facility/ms.frt3
-rw-r--r--amforth-6.5/common/lib/forth2012/facility/structures-array.frt24
-rw-r--r--amforth-6.5/common/lib/forth2012/facility/structures-test.frt16
-rw-r--r--amforth-6.5/common/lib/forth2012/facility/structures.frt24
-rw-r--r--amforth-6.5/common/lib/forth2012/facility/time-and-date.frt33
5 files changed, 0 insertions, 100 deletions
diff --git a/amforth-6.5/common/lib/forth2012/facility/ms.frt b/amforth-6.5/common/lib/forth2012/facility/ms.frt
deleted file mode 100644
index 7dfcd5d..0000000
--- a/amforth-6.5/common/lib/forth2012/facility/ms.frt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-\ a trivial multitasking friendly ms
-: ms 0 ?do pause 1ms loop ;
diff --git a/amforth-6.5/common/lib/forth2012/facility/structures-array.frt b/amforth-6.5/common/lib/forth2012/facility/structures-array.frt
deleted file mode 100644
index 14e62df..0000000
--- a/amforth-6.5/common/lib/forth2012/facility/structures-array.frt
+++ /dev/null
@@ -1,24 +0,0 @@
-
-begin-structure hash
- field: hash.key
- field: hash.value
-end-structure
-
-\ inspired by CELLS
-: hash-cells hash * ;
-
-\ define a hash-array
-: hash:
- hash-cells buffer:
- does>
- swap hash-cells +
-;
-
-\ define an array of some elements hash'es
-4 hash: my-hash
-cr 0 my-hash .
-cr 1 my-hash .
-
-\ store a key/value pair
-42 3 my-hash hash.key !
-4711 3 my-hash hash.value !
diff --git a/amforth-6.5/common/lib/forth2012/facility/structures-test.frt b/amforth-6.5/common/lib/forth2012/facility/structures-test.frt
deleted file mode 100644
index c4e810c..0000000
--- a/amforth-6.5/common/lib/forth2012/facility/structures-test.frt
+++ /dev/null
@@ -1,16 +0,0 @@
-\ simple test example for forth200x structures
-\ define a new data structure named list.
-
-begin-structure list
- field: l.p \ previous
- field: l.n \ next
- field: l.d \ data
-end-structure
-
-\ create an instance of the datastructure list
-\ named listroot
-
-list buffer: listroot
-
-\ access an element from the instance
-$55aa listroot l.d !
diff --git a/amforth-6.5/common/lib/forth2012/facility/structures.frt b/amforth-6.5/common/lib/forth2012/facility/structures.frt
deleted file mode 100644
index 65f8e5e..0000000
--- a/amforth-6.5/common/lib/forth2012/facility/structures.frt
+++ /dev/null
@@ -1,24 +0,0 @@
-\ structures according to http://www.forth200x.org/structures.html
-\ and http://www.forth200x.org/structures2.html
-\ the reference implementation does not work since amforth uses
-\ not the unified memory model for dictionary and data
-
-: +field: ( n1 "<spaces>name" -- n2 )
- create over , +
- does> @i +
-;
-
-: begin-structure
- create dp 0 -1 , \ -1 saves a flash erase when end-structure is executed
- does>
- @i
-;
-
-: end-structure
- swap !i
-;
-
-: cfield: 1 +field: ;
-: field: 2 +field: ;
-\ 2field is not standard, but why not?
-: 2field: 4 +field: ;
diff --git a/amforth-6.5/common/lib/forth2012/facility/time-and-date.frt b/amforth-6.5/common/lib/forth2012/facility/time-and-date.frt
deleted file mode 100644
index aecbeff..0000000
--- a/amforth-6.5/common/lib/forth2012/facility/time-and-date.frt
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-\ common words for date&time
-
-\ uses timer interrrupt module to call
-\ a background task every second.
-
-\ holds the ever increasing time ticks
-\ unfortunatly, a day has more seconds
-\ a 16bit variable can store.
-2variable time \ the seconds of the current day
-2variable date \ a day number
-
-\ a background task
-: next-second
- time 2@ 1. d+ 2dup
- 86399. d> if
- 2drop 0.
- 1. date d+!
- then
- time 2!
-;
-
-: dateinit
- 0. time 2!
- 0. date 2!
-;
-
-\ simple world. Every month has 30 days
-: time&date ( -- sec min hour day month year )
- date 2@ 365 um/mod 30 /mod ( -- day month year )
- time 2@ 24 um/mod 60 /mod ( -- sec min hour )
-;