blob: 3519751e6d18b4a267e203a2b4b0b5c5d0ea9110 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
\ *****************************************************************************
\ * Copyright (c) 2011 IBM Corporation
\ * All rights reserved.
\ * This program and the accompanying materials
\ * are made available under the terms of the BSD License
\ * which accompanies this distribution, and is available at
\ * http://www.opensource.org/licenses/bsd-license.php
\ *
\ * Contributors:
\ * IBM Corporation - initial implementation
\ ****************************************************************************/
." Populating " pwd cr
: open true ;
: close ;
: write ( adr len -- actual )
tuck
0 ?DO
dup c@ my-unit SWAP hv-putchar
1 +
LOOP
drop
;
: read ( adr len -- actual )
0= IF drop 0 EXIT THEN
my-unit hv-haschar 0= IF 0 swap c! -2 EXIT THEN
my-unit hv-getchar swap c! 1
;
: setup-alias
" hvterm" find-alias 0= IF
" hvterm" get-node node>path set-alias
ELSE
drop
THEN
;
setup-alias
|