aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/forth2012/blocks/list.frt
blob: 2520aeba1293ba5b1cdba0505ea9646be6a39fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
 ;