halt j halt
This commit is contained in:
parent
bfa4a8cd72
commit
12421d0e5d
23 changed files with 270 additions and 173 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 18.0.0, 2025-12-06T16:44:56. -->
|
||||
<!-- Written by QtCreator 18.0.0, 2025-12-07T14:09:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
|
@ -105,16 +105,16 @@
|
|||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DQT_MAINTENANCE_TOOL:FILEPATH=/home/aljaz/Qt/MaintenanceTool
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,42 +1,58 @@
|
|||
# ninja log v6
|
||||
3 12 1765104358285354663 simulator_autogen/timestamp c193a23cfe79571d
|
||||
12 211 1765102701378556517 CMakeFiles/simulator.dir/executor.cpp.o 8cd2a28f3c211eaa
|
||||
196 1272 1765103738453735097 CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o 5301f473905a545f
|
||||
13 190 1765104358295354758 CMakeFiles/simulator.dir/loader.cpp.o 8371bb969cd708a5
|
||||
13 1495 1765104358295354758 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
3 12 1765104358285354663 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
279 601 1765102522843450557 CMakeFiles/simulator.dir/machine.cpp.o 7030a03f8cbf1ad0
|
||||
3 12 1765104358285354663 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 12 1765104358285354663 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
12 22 1765010490368890036 CMakeFiles/simulator.dir/opcode.cpp.o da65f589ec5e1f76
|
||||
196 1727 1765103738453735097 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1
|
||||
1548 1805 1765111899982191404 simulator 53725ab159343a13
|
||||
201 521 1765010356080064621 CMakeFiles/simulator.dir/device.cpp.o 36fc5c8cf014f45b
|
||||
1495 1755 1765104359777368855 simulator 53725ab159343a13
|
||||
2 12 1765104478951331762 simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 12 1765104478951331762 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
2 12 1765104478951331762 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 12 1765104478951331762 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
13 189 1765104478962331836 CMakeFiles/simulator.dir/loader.cpp.o 8371bb969cd708a5
|
||||
12 1581 1765104478961331830 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1581 1820 1765104480530342428 simulator 53725ab159343a13
|
||||
2 15 1765104546817746682 simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 15 1765104546817746682 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
2 15 1765104546817746682 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 15 1765104546817746682 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
15 195 1765104546830746753 CMakeFiles/simulator.dir/loader.cpp.o 8371bb969cd708a5
|
||||
15 1567 1765104546830746753 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1567 1813 1765104548382755242 simulator 53725ab159343a13
|
||||
2 11 1765104771629589940 simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 11 1765104771629589940 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
2 11 1765104771629589940 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 11 1765104771629589940 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
12 182 1765104771639589962 CMakeFiles/simulator.dir/loader.cpp.o 8371bb969cd708a5
|
||||
11 1545 1765104771638589960 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1545 1789 1765104773172593404 simulator 53725ab159343a13
|
||||
2 11 1765104802251653702 simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 11 1765104802251653702 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
2 11 1765104802251653702 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 11 1765104802251653702 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
12 181 1765104802261653722 CMakeFiles/simulator.dir/loader.cpp.o 8371bb969cd708a5
|
||||
12 1544 1765104802261653722 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1544 1779 1765104803793656641 simulator 53725ab159343a13
|
||||
2 15 1765111898436188876 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
196 1434 1765110462333523342 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1
|
||||
12 22 1765010490368890036 CMakeFiles/simulator.dir/opcode.cpp.o da65f589ec5e1f76
|
||||
2 15 1765111898436188876 simulator_autogen/timestamp c193a23cfe79571d
|
||||
197 442 1765110462334523390 CMakeFiles/simulator.dir/executor.cpp.o 8cd2a28f3c211eaa
|
||||
196 1360 1765110462333523342 CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o 5301f473905a545f
|
||||
15 1548 1765111898449188897 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
20 193 1765111701554738096 CMakeFiles/simulator.dir/loader.cpp.o 8371bb969cd708a5
|
||||
2 15 1765111898436188876 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
196 577 1765110462333523342 CMakeFiles/simulator.dir/machine.cpp.o 7030a03f8cbf1ad0
|
||||
2 15 1765111898436188876 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 21 1765112361021879127 simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 21 1765112361021879127 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
3 21 1765112361021879127 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 21 1765112361021879127 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
21 1518 1765112361039878812 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1518 1757 1765112362536852698 simulator 53725ab159343a13
|
||||
3 194 1765112928214835963 simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 194 1765112928214835963 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
3 194 1765112928214835963 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 194 1765112928214835963 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
194 1271 1765112928218835927 CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o 5301f473905a545f
|
||||
194 1290 1765112928218835927 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1
|
||||
194 2215 1765112928218835927 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
2215 2455 1765112930239817921 simulator 53725ab159343a13
|
||||
3 322 1765113045535842268 simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 322 1765113045535842268 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
3 322 1765113045535842268 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 322 1765113045535842268 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
322 2180 1765113045539842236 CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o 5301f473905a545f
|
||||
323 2237 1765113045540842228 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1
|
||||
323 2762 1765113045540842228 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
2762 3020 1765113047979822601 simulator 53725ab159343a13
|
||||
2 11 1765113236062412838 simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 11 1765113236062412838 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
2 11 1765113236062412838 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
2 11 1765113236062412838 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
11 1545 1765113236071412775 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1545 1803 1765113237605402021 simulator 53725ab159343a13
|
||||
3 222 1765113631687914761 simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 222 1765113631687914761 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
3 222 1765113631687914761 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
3 222 1765113631687914761 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
223 537 1765113631692914732 CMakeFiles/simulator.dir/executor.cpp.o 8cd2a28f3c211eaa
|
||||
223 1404 1765113631692914732 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1
|
||||
222 1802 1765113631691914738 CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o 5301f473905a545f
|
||||
223 2084 1765113631692914732 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
2084 2328 1765113633553903993 simulator 53725ab159343a13
|
||||
1 10 1765113772153122676 simulator_autogen/timestamp c193a23cfe79571d
|
||||
1 10 1765113772153122676 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
1 10 1765113772153122676 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d
|
||||
1 10 1765113772153122676 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d
|
||||
10 204 1765113772162122627 CMakeFiles/simulator.dir/machine.cpp.o 7030a03f8cbf1ad0
|
||||
10 1574 1765113772162122627 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516
|
||||
1574 1820 1765113773726114000 simulator 53725ab159343a13
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,19 +1,19 @@
|
|||
# Generated by CMake. Changes will be overwritten.
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/executor.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/loader.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/executor.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/opcode.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/device.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/mainwindow.cpp
|
||||
uic:ui_mainwindow.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/device.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/opcode.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/executor.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/loader.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/executor.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/main.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/device.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/loader.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/machine.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/machine.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/opcode.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/mainwindow.h
|
||||
mmc:Q_OBJECT
|
||||
mdp:/home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/moc_predefs.h
|
||||
mdp:/home/aljaz/Desktop/spo/ass2/simulator/device.h
|
||||
mdp:/home/aljaz/Desktop/spo/ass2/simulator/executor.h
|
||||
mdp:/home/aljaz/Desktop/spo/ass2/simulator/loader.h
|
||||
mdp:/home/aljaz/Desktop/spo/ass2/simulator/machine.h
|
||||
mdp:/home/aljaz/Desktop/spo/ass2/simulator/mainwindow.h
|
||||
|
|
@ -466,5 +466,6 @@
|
|||
mdp:/usr/lib/gcc/x86_64-linux-gnu/13/include/stdarg.h
|
||||
mdp:/usr/lib/gcc/x86_64-linux-gnu/13/include/stdbool.h
|
||||
mdp:/usr/lib/gcc/x86_64-linux-gnu/13/include/stddef.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/opcode.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/machine.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/machine.h
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/loader.cpp
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/device.h
|
||||
|
|
|
|||
4
ass2/simulator/build/Desktop_Qt_6_10_1-Debug/horner.obj
Normal file
4
ass2/simulator/build/Desktop_Qt_6_10_1-Debug/horner.obj
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
HHORNER000000000027
|
||||
T0000001E01000123201B19000223201519000323200F1900042320091900050F2006
|
||||
T00001E063F2FFD000002
|
||||
E000000
|
||||
Binary file not shown.
|
|
@ -41,7 +41,8 @@ template <> constexpr inline auto MainWindow::qt_create_metaobjectdata<qt_meta_t
|
|||
"MainWindow",
|
||||
"on_readButton_clicked",
|
||||
"",
|
||||
"onLoadTriggered"
|
||||
"onLoadTriggered",
|
||||
"on_runButton_clicked"
|
||||
};
|
||||
|
||||
QtMocHelpers::UintData qt_methods {
|
||||
|
|
@ -49,6 +50,8 @@ template <> constexpr inline auto MainWindow::qt_create_metaobjectdata<qt_meta_t
|
|||
QtMocHelpers::SlotData<void()>(1, 2, QMC::AccessPrivate, QMetaType::Void),
|
||||
// Slot 'onLoadTriggered'
|
||||
QtMocHelpers::SlotData<void()>(3, 2, QMC::AccessPrivate, QMetaType::Void),
|
||||
// Slot 'on_runButton_clicked'
|
||||
QtMocHelpers::SlotData<void()>(4, 2, QMC::AccessPrivate, QMetaType::Void),
|
||||
};
|
||||
QtMocHelpers::UintData qt_properties {
|
||||
};
|
||||
|
|
@ -74,6 +77,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
|
|||
switch (_id) {
|
||||
case 0: _t->on_readButton_clicked(); break;
|
||||
case 1: _t->onLoadTriggered(); break;
|
||||
case 2: _t->on_runButton_clicked(); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
|
@ -99,14 +103,14 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
|||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 2)
|
||||
if (_id < 3)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 2;
|
||||
_id -= 3;
|
||||
}
|
||||
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 2)
|
||||
if (_id < 3)
|
||||
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||
_id -= 2;
|
||||
_id -= 3;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp: /home/aljaz/Desktop/spo/ass2/simulator/mainwindow.h \
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/moc_predefs.h \
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/device.h \
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/executor.h \
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/loader.h \
|
||||
/home/aljaz/Desktop/spo/ass2/simulator/machine.h \
|
||||
/home/aljaz/Qt/6.10.1/gcc_64/include/QtCore/q17memory.h \
|
||||
|
|
|
|||
|
|
@ -57,8 +57,11 @@ public:
|
|||
QLabel *valueLabel;
|
||||
QPushButton *readButton;
|
||||
QSpacerItem *horizontalSpacer;
|
||||
QPushButton *pushButton_2;
|
||||
QPushButton *pushButton;
|
||||
QPushButton *runButton;
|
||||
QSpacerItem *horizontalSpacer_3;
|
||||
QPushButton *stopButton;
|
||||
QSpacerItem *horizontalSpacer_4;
|
||||
QPushButton *stepButon;
|
||||
QMenuBar *menubar;
|
||||
QMenu *menuLoad;
|
||||
QMenu *menuVizitka;
|
||||
|
|
@ -68,7 +71,7 @@ public:
|
|||
{
|
||||
if (MainWindow->objectName().isEmpty())
|
||||
MainWindow->setObjectName("MainWindow");
|
||||
MainWindow->resize(844, 757);
|
||||
MainWindow->resize(902, 757);
|
||||
actionExit = new QAction(MainWindow);
|
||||
actionExit->setObjectName("actionExit");
|
||||
centralwidget = new QWidget(MainWindow);
|
||||
|
|
@ -112,7 +115,7 @@ public:
|
|||
gridLayout_3->setContentsMargins(0, 0, 0, 0);
|
||||
layoutWidget = new QWidget(centralwidget);
|
||||
layoutWidget->setObjectName("layoutWidget");
|
||||
layoutWidget->setGeometry(QRect(240, 20, 581, 641));
|
||||
layoutWidget->setGeometry(QRect(240, 20, 541, 641));
|
||||
verticalLayout = new QVBoxLayout(layoutWidget);
|
||||
verticalLayout->setObjectName("verticalLayout");
|
||||
verticalLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
|
@ -122,13 +125,9 @@ public:
|
|||
verticalLayout->addWidget(label);
|
||||
|
||||
tableWidget = new QTableWidget(layoutWidget);
|
||||
if (tableWidget->columnCount() < 16)
|
||||
tableWidget->setColumnCount(16);
|
||||
if (tableWidget->rowCount() < 40)
|
||||
tableWidget->setRowCount(40);
|
||||
tableWidget->setObjectName("tableWidget");
|
||||
tableWidget->setRowCount(40);
|
||||
tableWidget->setColumnCount(16);
|
||||
tableWidget->setRowCount(0);
|
||||
tableWidget->setColumnCount(0);
|
||||
tableWidget->horizontalHeader()->setCascadingSectionResizes(false);
|
||||
tableWidget->horizontalHeader()->setMinimumSectionSize(27);
|
||||
tableWidget->horizontalHeader()->setDefaultSectionSize(34);
|
||||
|
|
@ -141,7 +140,7 @@ public:
|
|||
|
||||
layoutWidget1 = new QWidget(centralwidget);
|
||||
layoutWidget1->setObjectName("layoutWidget1");
|
||||
layoutWidget1->setGeometry(QRect(240, 680, 571, 27));
|
||||
layoutWidget1->setGeometry(QRect(240, 680, 541, 27));
|
||||
horizontalLayout_2 = new QHBoxLayout(layoutWidget1);
|
||||
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||
horizontalLayout_2->setContentsMargins(0, 0, 0, 0);
|
||||
|
|
@ -166,23 +165,36 @@ public:
|
|||
|
||||
horizontalLayout->addItem(horizontalSpacer);
|
||||
|
||||
runButton = new QPushButton(layoutWidget1);
|
||||
runButton->setObjectName("runButton");
|
||||
|
||||
horizontalLayout->addWidget(runButton);
|
||||
|
||||
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout->addItem(horizontalSpacer_3);
|
||||
|
||||
stopButton = new QPushButton(layoutWidget1);
|
||||
stopButton->setObjectName("stopButton");
|
||||
|
||||
horizontalLayout->addWidget(stopButton);
|
||||
|
||||
horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout->addItem(horizontalSpacer_4);
|
||||
|
||||
stepButon = new QPushButton(layoutWidget1);
|
||||
stepButon->setObjectName("stepButon");
|
||||
|
||||
horizontalLayout->addWidget(stepButon);
|
||||
|
||||
|
||||
horizontalLayout_2->addLayout(horizontalLayout);
|
||||
|
||||
pushButton_2 = new QPushButton(layoutWidget1);
|
||||
pushButton_2->setObjectName("pushButton_2");
|
||||
|
||||
horizontalLayout_2->addWidget(pushButton_2);
|
||||
|
||||
pushButton = new QPushButton(layoutWidget1);
|
||||
pushButton->setObjectName("pushButton");
|
||||
|
||||
horizontalLayout_2->addWidget(pushButton);
|
||||
|
||||
MainWindow->setCentralWidget(centralwidget);
|
||||
menubar = new QMenuBar(MainWindow);
|
||||
menubar->setObjectName("menubar");
|
||||
menubar->setGeometry(QRect(0, 0, 844, 20));
|
||||
menubar->setGeometry(QRect(0, 0, 902, 20));
|
||||
menuLoad = new QMenu(menubar);
|
||||
menuLoad->setObjectName("menuLoad");
|
||||
menuVizitka = new QMenu(menubar);
|
||||
|
|
@ -214,8 +226,9 @@ public:
|
|||
addressLineEdit->setPlaceholderText(QCoreApplication::translate("MainWindow", "Pomnilniski naslov", nullptr));
|
||||
valueLabel->setText(QCoreApplication::translate("MainWindow", "-", nullptr));
|
||||
readButton->setText(QCoreApplication::translate("MainWindow", "Preberi", nullptr));
|
||||
pushButton_2->setText(QCoreApplication::translate("MainWindow", "Levo", nullptr));
|
||||
pushButton->setText(QCoreApplication::translate("MainWindow", "Desno", nullptr));
|
||||
runButton->setText(QCoreApplication::translate("MainWindow", "Za\305\276eni", nullptr));
|
||||
stopButton->setText(QCoreApplication::translate("MainWindow", "Ustavi", nullptr));
|
||||
stepButon->setText(QCoreApplication::translate("MainWindow", "Korak", nullptr));
|
||||
menuLoad->setTitle(QCoreApplication::translate("MainWindow", "Menu", nullptr));
|
||||
menuVizitka->setTitle(QCoreApplication::translate("MainWindow", "Vizitka", nullptr));
|
||||
} // retranslateUi
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
Executor::Executor() {}
|
||||
|
||||
Executor::Executor(Machine* m) {
|
||||
machine = m;
|
||||
}
|
||||
|
||||
void Executor::start() {
|
||||
running = true;
|
||||
while (running) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ private:
|
|||
Machine* machine;
|
||||
public:
|
||||
Executor();
|
||||
Executor(Machine* m);
|
||||
// Zažene oz. nadaljuje samodejno izvajanje.
|
||||
void start();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,12 @@ int Loader::readByte(std::istream &in) {
|
|||
std::string byte;
|
||||
byte += c1;
|
||||
byte += c2;
|
||||
cout << "test: " << byte << " c1: " << c1 << " c2: " << c2 << endl;
|
||||
return std::stoi(byte, nullptr, 16);
|
||||
}
|
||||
|
||||
int Loader::readWord(std::istream &in) {
|
||||
int result = 0;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
int byte = readByte(in);
|
||||
if (byte < 0) return -1;
|
||||
result = (result << 8) | byte;
|
||||
|
|
@ -35,12 +34,22 @@ std::string Loader::readString(std::istream &in, int len) {
|
|||
return result;
|
||||
}
|
||||
|
||||
void skipNewline(std::istream& stream) {
|
||||
if (stream.peek() == '\r') {
|
||||
stream.get(); // odstrani \r
|
||||
}
|
||||
if (stream.peek() == '\n') {
|
||||
stream.get(); // odstrani \n
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Loader::loadSection(Machine& machine, std::istream& stream) {
|
||||
if (stream.get() != 'H') return false;
|
||||
cout << readString(stream, 6)<< endl; // ime programa ignoriramo
|
||||
readString(stream, 6); // ime programa ignoriramo
|
||||
int start = readWord(stream);
|
||||
int length = readWord(stream);
|
||||
if (stream.peek() == '\r' || stream.peek() == '\n') stream.get();
|
||||
skipNewline(stream);
|
||||
// Preberi text zapise
|
||||
int ch = stream.get();
|
||||
while (ch == 'T') {
|
||||
|
|
@ -51,14 +60,13 @@ bool Loader::loadSection(Machine& machine, std::istream& stream) {
|
|||
int val = readByte(stream);
|
||||
machine.writeByte(loc++, static_cast<unsigned char>(val));
|
||||
}
|
||||
if (stream.peek() == '\r' ||stream.peek() == '\n') stream.get();
|
||||
skipNewline(stream);
|
||||
ch = stream.get();
|
||||
}
|
||||
|
||||
// End zapis
|
||||
if (ch != 'E') return false;
|
||||
machine.setPC(readWord(stream));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void Machine::setReg(int reg, int val)
|
|||
}
|
||||
|
||||
unsigned char Machine::readByte(unsigned int address) {
|
||||
if (address > MAX_ADDRESS) {
|
||||
if (address > MAX_ADDRESS || address <0) {
|
||||
throw std::out_of_range("Memory read out of range");
|
||||
}
|
||||
return memory[address];
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ public:
|
|||
void setSW(int val) { SW = val; }
|
||||
void setF(double val) { F = val; }
|
||||
|
||||
int getMemSize() { return MEMORY_SIZE; }
|
||||
|
||||
int getReg(int reg);
|
||||
void setReg(int reg, int val);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,39 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
ui->setupUi(this);
|
||||
QAction *actionLoad = new QAction(tr("Load"), this);
|
||||
ui->menuLoad->addAction(actionLoad);
|
||||
|
||||
connect(actionLoad, &QAction::triggered, this, &MainWindow::onLoadTriggered);
|
||||
connect(ui->runButton, &QPushButton::clicked, this, &MainWindow::on_runButton_clicked);
|
||||
|
||||
// nastavi tabelo
|
||||
const int columns = 16;
|
||||
int memSize = machine.getMemSize(); // ali fiksno (npr. 1000000), če še ni naloženo
|
||||
int rows = (memSize + columns - 1) / columns;
|
||||
|
||||
ui->tableWidget->setColumnCount(columns);
|
||||
ui->tableWidget->setRowCount(rows);
|
||||
|
||||
// Nastavi naslove stolpcev
|
||||
QStringList headers;
|
||||
for (int c = 0; c < columns; ++c) {
|
||||
headers << QString("%1").arg(c, 2, 16, QChar('0')).toUpper();
|
||||
}
|
||||
ui->tableWidget->setHorizontalHeaderLabels(headers);
|
||||
|
||||
// Nastavi naslove vrstic v heks formatu
|
||||
QStringList verticalHeaders;
|
||||
for (int r = 0; r < rows; ++r) {
|
||||
verticalHeaders << QString("%1").arg(r * columns, 4, 16, QChar('0')).toUpper();
|
||||
}
|
||||
ui->tableWidget->setVerticalHeaderLabels(verticalHeaders);
|
||||
|
||||
// Nastavi fiksno širino stolpcev (ali prilagodi po potrebi)
|
||||
int columnWidth = 30;
|
||||
for (int c = 0; c < columns; ++c) {
|
||||
ui->tableWidget->setColumnWidth(c, columnWidth);
|
||||
}
|
||||
|
||||
// Nastavi politiko velikosti
|
||||
ui->tableWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
@ -36,6 +67,33 @@ void MainWindow::on_readButton_clicked()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_runButton_clicked() {
|
||||
executor.start();
|
||||
}
|
||||
|
||||
void populateMemoryTable(QTableWidget* tableWidget, Machine& machine) {
|
||||
const int columns = 16;
|
||||
int memSize = machine.getMemSize();
|
||||
|
||||
for (int r = 0; r < tableWidget->rowCount(); ++r) {
|
||||
for (int c = 0; c < columns; ++c) {
|
||||
int addr = r * columns + c;
|
||||
if (addr < memSize) {
|
||||
unsigned char val = machine.readByte(addr);
|
||||
QString hexVal = QString("%1").arg(val, 2, 16, QChar('0')).toUpper();
|
||||
// Posodobi ali ustvari nov element
|
||||
if (tableWidget->item(r, c)) {
|
||||
tableWidget->item(r, c)->setText(hexVal);
|
||||
} else {
|
||||
tableWidget->setItem(r, c, new QTableWidgetItem(hexVal));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MainWindow::onLoadTriggered() {
|
||||
QString filename = QFileDialog::getOpenFileName(this, tr("Open Object File"), "", tr("Object Files (*.obj)"));
|
||||
if (!filename.isEmpty()) {
|
||||
|
|
@ -44,4 +102,9 @@ void MainWindow::onLoadTriggered() {
|
|||
QMessageBox::warning(this, tr("Error"), tr("Failed to load file"));
|
||||
}
|
||||
}
|
||||
populateMemoryTable(ui->tableWidget, machine);
|
||||
ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
ui->tableWidget->horizontalHeader()->setDefaultSectionSize(30);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <QMainWindow>
|
||||
#include "machine.h"
|
||||
#include "loader.h"
|
||||
|
||||
#include "executor.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
|
|
@ -23,10 +23,13 @@ public:
|
|||
private slots:
|
||||
void on_readButton_clicked();
|
||||
void onLoadTriggered();
|
||||
void on_runButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
Machine machine;
|
||||
Loader loader;
|
||||
Machine machine;
|
||||
Executor executor{ &machine };
|
||||
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>844</width>
|
||||
<width>902</width>
|
||||
<height>757</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<rect>
|
||||
<x>240</x>
|
||||
<y>20</y>
|
||||
<width>581</width>
|
||||
<width>541</width>
|
||||
<height>641</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -121,10 +121,10 @@
|
|||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="rowCount">
|
||||
<number>40</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>16</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderCascadingSectionResizes">
|
||||
<bool>false</bool>
|
||||
|
|
@ -147,62 +147,6 @@
|
|||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<row/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
@ -212,7 +156,7 @@
|
|||
<rect>
|
||||
<x>240</x>
|
||||
<y>680</y>
|
||||
<width>571</width>
|
||||
<width>541</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -256,22 +200,55 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="runButton">
|
||||
<property name="text">
|
||||
<string>Zaženi</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="stopButton">
|
||||
<property name="text">
|
||||
<string>Ustavi</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="stepButon">
|
||||
<property name="text">
|
||||
<string>Korak</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Levo</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Desno</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
@ -280,7 +257,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>844</width>
|
||||
<width>902</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue