summaryrefslogtreecommitdiff
path: root/terminal/vt52.c
blob: 813cf4052761dbbda76acf3c20c905215ec7d198 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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()
{

}