CE interactive shell
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m36s

This commit is contained in:
2026-02-21 22:14:16 +01:00
parent dc021c0469
commit 02e77b5c90
30 changed files with 3259 additions and 18 deletions

View File

@@ -6,9 +6,24 @@
#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 ("ramdisk:/ce");
int ce_pgid = get_procgroup (ce_pid);
ce_pgid = get_procgroup (ce_pid);
process_spawn (&receiver, NULL);
for (;;) {
int ch = kb_read_key ();
@@ -17,10 +32,5 @@ void app_main (void) {
continue;
mail_send (ce_pgid, (uint8_t*)&ch, 1);
char rcv;
mail_receive (&rcv, 1);
/* test (rcv); */
terminal_print (&rcv, 1);
}
}