created basic simulator
This commit is contained in:
parent
8c02a9e950
commit
5a06b2bc0b
12 changed files with 541 additions and 0 deletions
16
ass2/main.cpp
Normal file
16
ass2/main.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include <iostream>
|
||||
#include "Machine.h"
|
||||
|
||||
int main() {
|
||||
Machine machine;
|
||||
|
||||
machine.setA(0x123456);
|
||||
machine.setX(0xABCDEF);
|
||||
machine.setPC(0x1000);
|
||||
|
||||
std::cout << "Register A: 0x" << std::hex << machine.getA() << std::endl;
|
||||
std::cout << "Register X: 0x" << std::hex << machine.getX() << std::endl;
|
||||
std::cout << "Program Counter: 0x" << std::hex << machine.getPC() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue