| |
|
| : open-blocks ( addr u -- ) \ gforth |
: open-blocks ( addr u -- ) \ gforth |
| \g use the file, whose name is given by @var{addr u}, as blocks file |
\g use the file, whose name is given by @var{addr u}, as blocks file |
| 2dup ['] open-fpath-file catch 0<> |
2dup open-fpath-file 0<> |
| if |
if |
| 2drop r/w bin create-file throw |
r/w bin create-file throw |
| else |
else |
| rot close-file throw 2dup file-status throw bin open-file throw |
rot close-file throw 2dup file-status throw bin open-file throw |
| >r 2drop r> |
>r 2drop r> |
| |
|
| : load ( i*x n -- j*x ) |
: load ( i*x n -- j*x ) |
| push-file |
push-file |
| dup loadline ! blk ! >in off ( ['] ) interpret ( catch ) |
dup loadline ! blk ! >in off ['] interpret catch |
| pop-file ( throw ) ; |
pop-file throw ; |
| |
|
| : thru ( i*x n1 n2 -- j*x ) |
: thru ( i*x n1 n2 -- j*x ) |
| 1+ swap ?DO I load LOOP ; |
1+ swap ?DO I load LOOP ; |