Files
mop3/init/init.c
kamkow1 0533c2705d
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
fat_io_lib finally works, implement virtual partition devices, manage devices via string keys
2026-03-01 00:00:27 +01:00

37 lines
598 B
C

#include <kb.h>
#include <limits.h>
#include <process.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <terminal.h>
static int ce_pgid;
void receiver (void) {
for (;;) {
char rcv;
mail_receive (&rcv, 1);
if (rcv == '\n')
terminal_print ("\r\n", 2);
else
terminal_print (&rcv, 1);
}
}
void app_main (void) {
int ce_pid = exec ("RD", "ce");
ce_pgid = get_procgroup (ce_pid);
process_spawn (&receiver, NULL);
for (;;) {
int ch = kb_read_key ();
if (ch <= 0)
continue;
mail_send (ce_pgid, (uint8_t*)&ch, 1);
}
}