summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-12-01 00:47:05 +1100
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-12-01 00:47:05 +1100
commit580a7040ba53367c15ca682d4ea90c31fdcca45f (patch)
tree58ccb3ddb419884f6f9da790b0173a62eb4dd22f /src/video
parent40447eccd6db43d636ccc518ae7792b7b43834b5 (diff)
large progress approaching functionality
Diffstat (limited to 'src/video')
-rw-r--r--src/video/ncurses.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/video/ncurses.c b/src/video/ncurses.c
index c3357c2..e4a7613 100644
--- a/src/video/ncurses.c
+++ b/src/video/ncurses.c
@@ -18,33 +18,34 @@ WINDOW *AppleWindow;
byte UserInput()
{
int c = getch();
- byte C;
+ byte r;
switch(c)
{
// Convert special characters
case KEY_BACKSPACE:
- C = 0xDF;
+ r = 0xDF;
case KEY_ENTER:
- C = 0x8D;
+ r = 0x8D;
case KEY_EXIT: //TODO: Figure out if this is Esc or not.
- C = 0x9B;
+ r = 0x9B;
// Convert regular characters
default:
if (c < 0x20 || c >= 0x60)
return -1;
if (c >= 0x40)
- C = c - 0x40;
+ r = c - 0x40;
else
- C = c;
+ r = c;
break;
}
- SetMemory(KBD, C);
+ SetMemory(KBD, r);
+
- TerminalInput(c);
+ TerminalInput(r);
return c;
@@ -68,6 +69,15 @@ void PrintInfo()
getFlag(flag_Z) ? 'Z':'.' ,
getFlag(flag_C) ? 'C':'.'
);
+ mvprintw(2, 65, "Stack");
+ int count = 3;
+ for (int i = 0x1ff; i > 0x1cf; i--) {
+ if (i == (0x1ff-S)) // Indicate the stack pointer!
+ attron(A_REVERSE);
+ mvprintw(count, 65, "%x : %x", i, GetMemory(i));
+ attroff(A_REVERSE);
+ count++;
+ }
refresh();
}