summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
author0x221E <0x221E@0xinfinity.dev>2026-04-12 16:59:40 +0200
committer0x221E <0x221E@0xinfinity.dev>2026-04-12 16:59:40 +0200
commita66c7433c2c11b8b6c99142277ed4e16b1a2a465 (patch)
treee54bcfb59c303acf6118fd11f06d5c0bd5f24e5d /src/main.cpp
initial commitHEADmaster
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..5dd1edb
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,35 @@
+#include <iostream>
+
+#include "Userspace.h"
+#include "GUI.h"
+#include <thread>
+
+// nop
+// mov eax, 0xF4
+// mov ecx, 0x8000
+// mov edx, 0x8000
+// add DWORD PTR [0x8011], eax
+uint8_t test[] = {
+ 0x90,
+ 0xB8, 0xF4, 0x00, 0x00, 0x00,
+ 0xB9, 0x00, 0x80, 0x00, 0x00,
+ 0xBA, 0x00, 0x80, 0x00, 0x00,
+ 0x01, 0x05, 0x16, 0x80, 0x00, 0x00,
+ 0x00,
+};
+
+int main(int argc, char** argv) {
+ Userspace user;
+ GUI gui(user);
+
+ user.Upload2Memory(test, 23);
+ std::thread tuserspace(&Userspace::Run, &user);
+
+ gui.Run();
+
+ user.Exit();
+
+ tuserspace.join();
+
+ return 0;
+}