summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
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;
+}