From d80736ab6e8e3cad2f1a30c6eaba2d6883dbe967 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 26 Aug 2017 20:31:40 +0200 Subject: Remove AmForth --- amforth-6.5/common/lib/forth2012/facility/ms.frt | 3 -- .../lib/forth2012/facility/structures-array.frt | 24 ---------------- .../lib/forth2012/facility/structures-test.frt | 16 ----------- .../common/lib/forth2012/facility/structures.frt | 24 ---------------- .../lib/forth2012/facility/time-and-date.frt | 33 ---------------------- 5 files changed, 100 deletions(-) delete mode 100644 amforth-6.5/common/lib/forth2012/facility/ms.frt delete mode 100644 amforth-6.5/common/lib/forth2012/facility/structures-array.frt delete mode 100644 amforth-6.5/common/lib/forth2012/facility/structures-test.frt delete mode 100644 amforth-6.5/common/lib/forth2012/facility/structures.frt delete mode 100644 amforth-6.5/common/lib/forth2012/facility/time-and-date.frt (limited to 'amforth-6.5/common/lib/forth2012/facility') 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 "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 ) -; -- cgit v1.2.3