aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/forth2012/blocks/list.frt
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/lib/forth2012/blocks/list.frt')
-rw-r--r--amforth-6.5/common/lib/forth2012/blocks/list.frt24
1 files changed, 24 insertions, 0 deletions
diff --git a/amforth-6.5/common/lib/forth2012/blocks/list.frt b/amforth-6.5/common/lib/forth2012/blocks/list.frt
new file mode 100644
index 0000000..2520aeb
--- /dev/null
+++ b/amforth-6.5/common/lib/forth2012/blocks/list.frt
@@ -0,0 +1,24 @@
+
+\ a list in text format. not suitable
+\ for binary data!
+
+\ #16 constant #lines
+\ #64 constant #cols
+
+ #8 constant #lines
+#64 constant #cols
+
+: list ( blk -- ) \ list selected screen
+ dup scr !
+ dup cr ." Listing of screen (" .
+ dup updated? if ." not " then ." modified)" cr
+ buffer
+ #lines 0
+ do
+ cr i 0 <# [char] : hold # # #> type space
+ dup i #cols * +
+ #cols type
+ [char] | emit
+ loop
+ cr
+ ;