2 * Creation Date: <2004/08/28 18:38:22 greg>
3 * Time-stamp: <2004/08/28 18:38:22 greg>
7 * Misc device node methods
9 * Copyright (C) 2004 Greg Watson
11 * Based on MOL specific code which is
13 * Copyright (C) 2003, 2004 Samuel Rydh (samuel@ibrium.se)
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
22 #include "libopenbios/bindings.h"
23 #include "libc/string.h"
24 // #include "libopenbios/ofmem.h"
26 /************************************************************************/
28 /************************************************************************/
30 DECLARE_NODE( video_stdout
, INSTALL_OPEN
, 0, "Tdisplay" );
32 /* ( addr len -- actual ) */
37 char *addr
= (char*)POP();
41 console_draw_fstr(addr
, len
);
46 NODE_METHODS( video_stdout
) = {
47 { "write", stdout_write
},
51 /************************************************************************/
53 /************************************************************************/
55 DECLARE_NODE( tty
, INSTALL_OPEN
, 0, "/packages/terminal-emulator" );
57 /* ( addr len -- actual ) */
62 char *p
= (char*)POP();
77 /* ( addr len -- actual ) */
82 char *p
= (char*)POP();
83 for( i
=0; i
<len
; i
++ )
88 NODE_METHODS( tty
) = {
90 { "write", tty_write
},
93 /************************************************************************/
95 /************************************************************************/
98 node_methods_init( void )
100 REGISTER_NODE( video_stdout
);
101 REGISTER_NODE( tty
);