1 \ *****************************************************************************
2 \ * Copyright (c) 2011 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 \ PAPR hvterm console. Enabled very early.
15 0 CONSTANT default-hvtermno
16 \ Buffer for pre-display
17 4096 CONSTANT disp-size
18 CREATE prevga-disp-buf 4096 allot
20 true value store-prevga?
22 : store-to-disp-buffer ( ch -- )
23 prevga-disp-buf disp-ptr disp-size MOD + c!
24 disp-ptr 1 + to disp-ptr
29 dup store-to-disp-buffer
31 default-hvtermno SWAP hv-putchar
33 : hvterm-key? default-hvtermno hv-haschar ;
34 : hvterm-key BEGIN hvterm-key? UNTIL default-hvtermno hv-getchar ;
40 \ Override serial methods to make term-io.fs happy
41 : serial-emit hvterm-emit ;
42 : serial-key? hvterm-key? ;
43 : serial-key hvterm-key ;