initial cpu structure :thonk:

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-08-27 21:40:55 +05:30
parent ad64b1e8d1
commit 84c68a4e00
20 changed files with 449 additions and 42 deletions

View File

@@ -1,10 +1,17 @@
#include "matar.hh"
#include "emulator.hh"
#include <iostream>
int main() {
std::cout << "Hello" << std::endl;
if (run() > 0) {
std::cerr << "Crashed" << std::endl;
int
main(int argc, const char* argv[]) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <file>" << std::endl;
return 1;
}
try {
emulator::run(argv[1]);
} catch (const std::exception& e) {
std::cerr << "Exception: " << e.what() << std::endl;
return 1;
}