summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-12-03 11:32:39 +1100
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-12-03 11:32:39 +1100
commit991c09b01e6b099a5b00d7a9236d252b85a714b5 (patch)
treebee9445cbd318bbf7a805c80b5bc4b94517b44df /src/main.c
parent7a5672d085399d0de9d2c77431ea7a2f089faacb (diff)
half-fixed infinite loop; new debug util, old one out
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 46e6ba5..f4ddf1b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3,6 +3,8 @@
#include <ncurses.h>
#include <unistd.h>
+
+
int main() {
@@ -10,11 +12,19 @@ int main() {
DisplayInit();
+ FILE *Log = fopen("log/log.raw", "w+");
+ int Time = 0;
+
while(1) {
+ // Logging
+ fprintf(Log, "%04x : %04x\n", Time, PC);
+ fflush(Log);
+ // Computing
CallInstructionTable(GetMemory(PC), 0);
+ // Display information
PrintInfo();
- //sleep(3);
- //getch();
+ // Logging
+ Time++;
}
DisplayClose();