aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/forth2012/blocks/load.frt
blob: 55cd14ba55d20a0208713a98a853f62b24237877 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\ load a block and evaluate its content
\ 
: source-block1 
    blk1-buffer blocksize
;

: load ( i*x n -- j*y )
    ['] source defer@ >r >in @ >r
    0 >in !
    buffer drop 
    ['] source-block1 is source
    ['] interpret catch
    r> >in ! r> is source
    throw
;


: thru ( i*x n1 n2 -- j*y )
  1+ swap ?do i load loop
;