summaryrefslogtreecommitdiff
path: root/terminal/vt52.c
diff options
context:
space:
mode:
Diffstat (limited to 'terminal/vt52.c')
-rw-r--r--terminal/vt52.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/terminal/vt52.c b/terminal/vt52.c
new file mode 100644
index 0000000..813cf40
--- /dev/null
+++ b/terminal/vt52.c
@@ -0,0 +1,65 @@
+//
+// http://en.wikipedia.org/wiki/VT52
+//
+//
+//
+// ------------
+// PROG <---> | VT 52 | <--- Keyboard
+// | | ---> Screen
+// ------------
+
+
+
+// REQUIREMENTS
+// * kmalloc
+
+#include <stdint.h>
+#include "kernel/kmalloc.h"
+
+//TODO: check?
+#define VT52_WIDTH 80
+#define VT52_HEIGHT 24
+#define VT52_ESC 0x33
+
+typedef struct vt52_tty_struct
+{
+
+ uint8_t x;
+ uint8_t y;
+ uint8_t *data; // screen data
+
+}vt52_tty;
+
+
+vt52_tty *vt52_init()
+{
+ vt52_tty *tty=kmalloc(sizeof(vt52_tty));
+ return tty;
+}
+
+
+// User interaction
+void putKey(uint32_t code)
+{
+
+}
+
+void refreshScreen()
+{
+
+}
+
+// Programm Interaction
+void put()
+{
+
+}
+
+void get()
+{
+
+}
+
+
+
+