#include "register/register-manager.h" #include #include using namespace std; void stack_test(string astring) { astring.push_back('x'); } void heap_test(shared_ptr astring){ astring->push_back('y'); } int main() { auto reg = unique_ptr>(new Register("PC")); cout << "Register: " << reg->get_name() << " " << to_string(56) << endl; string astr = "hello"; shared_ptr bstr = make_shared("there"); cout << astr << " - " << bstr->c_str() << endl; stack_test(astr); heap_test(bstr); cout << astr << " - " << bstr->c_str() << endl; auto reg_man = new RegisterManager(); auto accum = reg_man->get_accumulator(); cout << "****** " << accum->get_name() << " ******" << endl; cout << "****** " << reg_man->get_x_index()->get_name() << " ******" << endl; cout << "****** " << reg_man->get_y_index()->get_name() << " ******" << endl; cout << "****** " << reg_man->get_stack_pointer()->get_name() << " ******" << endl; cout << "****** " << reg_man->get_status_register()->get_name() << " ******" << endl; cout << "****** " << reg_man->get_program_counter()->get_name() << " ******" << endl; return 0; }