Index: proj/libs/uart/include/uart.h
===================================================================
--- proj/libs/uart/include/uart.h	(revision 286)
+++ proj/libs/uart/include/uart.h	(revision 287)
@@ -50,7 +50,7 @@
 int uart_disable_int_tx(int base_addr);
 
 /// NCTP - Non-critical transmission protocol
-int nctp_init(void);
+int nctp_init(void (*proc_func)(const uint8_t*, const size_t));
 int nctp_free(void);
 
 int nctp_send(size_t num, uint8_t* ptr[], size_t sz[]);
@@ -58,7 +58,4 @@
 int nctp_ih_err;
 void nctp_ih(void);
 
-/// HLTP - High-level transmission protocol
-int hltp_send_string(const char *p);
-
 #endif //UART_H_INCLUDED
Index: proj/libs/uart/src/uart.c
===================================================================
--- proj/libs/uart/src/uart.c	(revision 286)
+++ proj/libs/uart/src/uart.c	(revision 287)
@@ -284,10 +284,12 @@
 
 queue_t *out = NULL;
 queue_t *in  = NULL;
+void (*process)(const uint8_t*, const size_t);
 
-int nctp_init(void){
+int nctp_init(void (*proc_func)(const uint8_t*, const size_t)){
     out = queue_ctor(); if(out == NULL) return NULL_PTR;
     in  = queue_ctor(); if(in  == NULL) return NULL_PTR;
+    process = proc_func;
     return SUCCESS;
 }
 int nctp_free(void){
@@ -326,7 +328,6 @@
     }
     return SUCCESS;
 }
-
 static int nctp_transmit(void){
     if(!queue_empty(out)){
         int ret = uart_send_char(COM1_ADDR, *(uint8_t*)queue_top(out));
@@ -335,14 +336,19 @@
     }else return SUCCESS;
 }
 
-static void process(){
+static void nctp_process_received(){
     free(queue_top(in)); queue_pop(in);
+    size_t sz = 1024; uint8_t *p = malloc(sz*sizeof(uint8_t));
+    size_t i = 0;
     while(*(uint8_t*)queue_top(in) != NCTP_END){
-        printf("%c", *(uint8_t*)queue_top(in));
+        //printf("%c\n", *(uint8_t*)queue_top(in));
+        p[i++] = *(uint8_t*)queue_top(in);
         free(queue_top(in)); queue_pop(in);
+        if(i >= sz) p = realloc(p, sz=2*sz);
     }
-    printf("\n");
     free(queue_top(in)); queue_pop(in);
+    process(p, i);
+    free(p);
 }
 static int nctp_receive(void){
     int ret;
@@ -354,7 +360,7 @@
         queue_push(in, tmp);
         if(c == NCTP_END) ++num_ends;
     }
-    while(num_ends-- > 0) process();
+    while(num_ends-- > 0) nctp_process_received();
     return SUCCESS;
 }
 
@@ -370,10 +376,3 @@
         }
     }
 }
-
-/// HLTP
-int hltp_send_string(const char *p){
-    uint8_t* ptr[1]; ptr[0] = (uint8_t*)p;
-    size_t    sz[1]; sz[0] = strlen(p)+1;
-    return nctp_send(1, ptr, sz);
-}
Index: proj/src/interrupts_func.c
===================================================================
--- proj/src/interrupts_func.c	(revision 286)
+++ proj/src/interrupts_func.c	(revision 287)
@@ -4,7 +4,7 @@
 #include "timer.h"
 #include "keyboard.h"
 #include "mouse.h"
-#include "uart.h"
+#include "hltp.h"
 #include "utils.h"
 #include "errors.h"
 
@@ -50,6 +50,18 @@
                                          NULL,
                                      };
 
+static void process_received(const uint8_t *p, const size_t sz){
+    void *q = NULL;
+    hltp_type t = hltp_interpret(p, sz, &q);
+    switch(t){
+        case hltp_type_string:{
+            char *s = q;
+            printf("%s\n", s);
+        } break;
+        default: break;
+    }
+}
+
 int (subscribe_all)(void) {
 
     /// Timer interrupt handling
@@ -111,7 +123,7 @@
         return SBCR_ERROR;
     }
     uart_subscribed = 1;
-    nctp_init();
+    nctp_init(process_received);
 
     return SUCCESS;
 }
Index: proj/src/proj.c
===================================================================
--- proj/src/proj.c	(revision 286)
+++ proj/src/proj.c	(revision 287)
@@ -12,7 +12,7 @@
 #include "mouse.h"
 #include "graph.h"
 #include "rtc.h"
-#include "uart.h"
+#include "hltp.h"
 #include "interrupts_func.h"
 #include "makecode_map.h"
 
Index: proj/DR.mk
===================================================================
--- proj/DR.mk	(revision 286)
+++ proj/DR.mk	(revision 287)
@@ -9,7 +9,7 @@
 .PATH: ${.CURDIR}/libs/classes/src
 .PATH: ${.CURDIR}/libs/utils/src
 
-SRCS= proj.c list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c font.c xpm_utils.c ent.c rtc.c uart.c makecode_map.c
+SRCS= proj.c list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c font.c xpm_utils.c ent.c rtc.c uart.c hltp.c makecode_map.c
 IPATHS=-I./include -I./libs/graph/include -I./libs/kbc/include -I./libs/rtc/include -I./libs/timer/include -I./libs/uart/include -I./libs/classes/include -I./libs/utils/include -I./maps -I./media/xpm
 
 CPPFLAGS += -pedantic ${IPATHS} -D LCOM_MACRO #-D __LCOM_OPTIMIZED_
