summaryrefslogtreecommitdiffstats
path: root/tis100-curses.c
diff options
context:
space:
mode:
Diffstat (limited to 'tis100-curses.c')
-rw-r--r--tis100-curses.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tis100-curses.c b/tis100-curses.c
index cc36066..e1925c7 100644
--- a/tis100-curses.c
+++ b/tis100-curses.c
@@ -5,10 +5,13 @@
#include "asm.h"
#include <curses.h>
+
#include <sys/inotify.h>
#include <unistd.h>
#include <locale.h>
+
#include <errno.h>
+#include <ctype.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
@@ -301,6 +304,9 @@ tui_draw_tpu(struct tpu *tpu)
if (tpu->ports[DIR_UP].attached) {
port = &tpu->ports[DIR_UP];
+ if (port->dst_port->io)
+ tui_draw_text(sx + 10, sy - 1, A_BOLD,
+ "IN.%c", toupper(port->dst_port->io->c));
if (port->writing)
tui_draw_lit(sx + 8, sy - 1, A_BOLD, port->out);
if (port->type & PORT_OUT)
@@ -315,6 +321,9 @@ tui_draw_tpu(struct tpu *tpu)
if (tpu->ports[DIR_DOWN].attached) {
port = &tpu->ports[DIR_DOWN];
+ if (port->dst_port->io)
+ tui_draw_text(sx + 9, sy + TPU_H, A_BOLD,
+ "OUT.%c", toupper(port->dst_port->io->c));
if (port->avail)
tui_draw_lit(sx + 8, sy + TPU_H, A_BOLD, port->in);
if (port->type & PORT_IN)