aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/lib/hardware/flash-block.frt
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/avr8/lib/hardware/flash-block.frt')
-rw-r--r--amforth-6.5/avr8/lib/hardware/flash-block.frt37
1 files changed, 0 insertions, 37 deletions
diff --git a/amforth-6.5/avr8/lib/hardware/flash-block.frt b/amforth-6.5/avr8/lib/hardware/flash-block.frt
deleted file mode 100644
index 661e3b4..0000000
--- a/amforth-6.5/avr8/lib/hardware/flash-block.frt
+++ /dev/null
@@ -1,37 +0,0 @@
-\
-\ flash-block
-\ contiguous flash region used a block storage
-\
-\ requires blocks.frt (for init and blocksize)
-\
-
-\ start address for blocks.
-\ the block data starts at
-\ flash.base-addr + (blocknum*blocksize)
-\ it could be beyond the 128K limit, if the
-\ !i and @i are replaced by words which take a
-\ doube cell address or handle the block at once
-\ (preferred)
-\
-variable flash.base-addr
-
-\ remember a flash cell contains 2 bytes
-
-: flash.load-buffer ( a-addr u -- )
- 1- blocksize 2/ * flash.base-addr @ +
- blocksize 2/ bounds ?do i @i over ! cell+ loop drop
-;
-
-: flash.save-buffer ( a-addr u -- )
- 1- blocksize 2/ * flash.base-addr @ +
- ." still debugging. no actual flash write!"
- blocksize 2/ bounds ?do dup @ i 2drop ( !i) cell+ loop drop
-;
-
-\ for turnkey
-: flash.init ( -- )
- ['] flash.load-buffer is load-buffer
- ['] flash.save-buffer is save-buffer
- 0 flash.base-addr !
- block:init
-;