diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/codemodel-v2-bf109316b2adb0d27109.json b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/codemodel-v2-9908d093f7d320a6f887.json similarity index 91% rename from ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/codemodel-v2-bf109316b2adb0d27109.json rename to ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/codemodel-v2-9908d093f7d320a6f887.json index ce48c4e..314b4d9 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/codemodel-v2-bf109316b2adb0d27109.json +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/codemodel-v2-9908d093f7d320a6f887.json @@ -7,7 +7,7 @@ { "build" : ".", "hasInstallRule" : true, - "jsonFile" : "directory-.-Debug-37186cc2dcdc365a64e7.json", + "jsonFile" : "directory-.-Debug-b087ac99b4952b24d922.json", "minimumCMakeVersion" : { "string" : "3.16" @@ -44,7 +44,7 @@ { "directoryIndex" : 0, "id" : "simulator::@6890427a1f51a3e7e1df", - "jsonFile" : "target-simulator-Debug-2b3217783aa5062c29e1.json", + "jsonFile" : "target-simulator-Debug-edef6bab040a42101471.json", "name" : "simulator", "projectIndex" : 0 }, diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/directory-.-Debug-37186cc2dcdc365a64e7.json b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/directory-.-Debug-b087ac99b4952b24d922.json similarity index 95% rename from ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/directory-.-Debug-37186cc2dcdc365a64e7.json rename to ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/directory-.-Debug-b087ac99b4952b24d922.json index d920542..d92f347 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/directory-.-Debug-37186cc2dcdc365a64e7.json +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/directory-.-Debug-b087ac99b4952b24d922.json @@ -17,13 +17,13 @@ { "command" : 0, "file" : 0, - "line" : 31, + "line" : 32, "parent" : 0 }, { "command" : 0, "file" : 0, - "line" : 42, + "line" : 43, "parent" : 0 } ] diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply/index-2025-12-07T08-37-15-0594.json b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/index-2025-12-07T08-37-15-0594.json similarity index 100% rename from ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply/index-2025-12-07T08-37-15-0594.json rename to ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/index-2025-12-07T08-37-15-0594.json diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/target-simulator-Debug-2b3217783aa5062c29e1.json b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/target-simulator-Debug-edef6bab040a42101471.json similarity index 96% rename from ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/target-simulator-Debug-2b3217783aa5062c29e1.json rename to ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/target-simulator-Debug-edef6bab040a42101471.json index 9b5daf2..1874530 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/target-simulator-Debug-2b3217783aa5062c29e1.json +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/target-simulator-Debug-edef6bab040a42101471.json @@ -71,13 +71,13 @@ { "command" : 4, "file" : 1, - "line" : 31, + "line" : 32, "parent" : 0 }, { "command" : 5, "file" : 1, - "line" : 23, + "line" : 24, "parent" : 0 }, { @@ -293,7 +293,8 @@ 6, 8, 10, - 12 + 12, + 14 ] } ], @@ -384,8 +385,8 @@ "sourceIndexes" : [ 0, - 13, - 14 + 15, + 16 ] }, { @@ -397,7 +398,8 @@ 6, 8, 10, - 12 + 12, + 14 ] }, { @@ -408,7 +410,8 @@ 5, 7, 9, - 11 + 11, + 13 ] }, { @@ -422,7 +425,7 @@ "name" : "CMake Rules", "sourceIndexes" : [ - 15 + 17 ] } ], @@ -501,6 +504,17 @@ "path" : "executor.cpp", "sourceGroupIndex" : 1 }, + { + "backtrace" : 4, + "path" : "loader.h", + "sourceGroupIndex" : 2 + }, + { + "backtrace" : 4, + "compileGroupIndex" : 0, + "path" : "loader.cpp", + "sourceGroupIndex" : 1 + }, { "backtrace" : 0, "isGenerated" : true, diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/index-2025-12-07T08-37-00-0253.json b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply/index-2025-12-07T10-47-00-0942.json similarity index 92% rename from ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/index-2025-12-07T08-37-00-0253.json rename to ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply/index-2025-12-07T10-47-00-0942.json index ce4e33a..73bf779 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply.prev/index-2025-12-07T08-37-00-0253.json +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.cmake/api/v1/reply/index-2025-12-07T10-47-00-0942.json @@ -26,7 +26,7 @@ "objects" : [ { - "jsonFile" : "codemodel-v2-bf109316b2adb0d27109.json", + "jsonFile" : "codemodel-v2-9908d093f7d320a6f887.json", "kind" : "codemodel", "version" : { @@ -77,7 +77,7 @@ }, "codemodel-v2" : { - "jsonFile" : "codemodel-v2-bf109316b2adb0d27109.json", + "jsonFile" : "codemodel-v2-9908d093f7d320a6f887.json", "kind" : "codemodel", "version" : { diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_deps b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_deps index ccc5efd..0f32f59 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_deps and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_deps differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_log b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_log index 552ccf2..7cb449e 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_log +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.ninja_log @@ -1,12 +1,42 @@ # ninja log v6 -201 521 1765010356080064621 CMakeFiles/simulator.dir/device.cpp.o 36fc5c8cf014f45b -14 1383 1765010511012053000 CMakeFiles/simulator.dir/mainwindow.cpp.o e3901bb2e4f9b516 +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 -201 1347 1765010356080064621 CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o 5301f473905a545f -2 14 1765010511000055645 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/mocs_compilation.cpp c193a23cfe79571d -14 192 1765010511012053000 CMakeFiles/simulator.dir/machine.cpp.o 7030a03f8cbf1ad0 -201 1336 1765010356080064621 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1 -2 14 1765010511000055645 /home/aljaz/Desktop/spo/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/timestamp c193a23cfe79571d -1383 1623 1765010512380751634 simulator 9e4eca252dc331ef -2 14 1765010511000055645 simulator_autogen/mocs_compilation.cpp c193a23cfe79571d -2 14 1765010511000055645 simulator_autogen/timestamp c193a23cfe79571d +196 1727 1765103738453735097 CMakeFiles/simulator.dir/main.cpp.o 9ebba9b7abc4cbf1 +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 diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/QFileDialog.ADA144A469D2D73A.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/QFileDialog.ADA144A469D2D73A.idx new file mode 100644 index 0000000..e072017 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/QFileDialog.ADA144A469D2D73A.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/codecvt.B2502761EE3434A6.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/codecvt.B2502761EE3434A6.idx new file mode 100644 index 0000000..32a8501 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/codecvt.B2502761EE3434A6.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/executor.cpp.49C8014B8C305999.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/executor.cpp.49C8014B8C305999.idx index eac3041..46d7ac3 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/executor.cpp.49C8014B8C305999.idx and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/executor.cpp.49C8014B8C305999.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/filesystem.4652087A2AD5D137.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/filesystem.4652087A2AD5D137.idx new file mode 100644 index 0000000..e66ee57 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/filesystem.4652087A2AD5D137.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_dir.h.A089296A94B22504.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_dir.h.A089296A94B22504.idx new file mode 100644 index 0000000..ebd7635 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_dir.h.A089296A94B22504.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_fwd.h.EA939A931E1D8A03.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_fwd.h.EA939A931E1D8A03.idx new file mode 100644 index 0000000..643063b Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_fwd.h.EA939A931E1D8A03.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_ops.h.BD757075C6F6C969.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_ops.h.BD757075C6F6C969.idx new file mode 100644 index 0000000..2632c73 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_ops.h.BD757075C6F6C969.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_path.h.CFB2EE3B98DFF5B1.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_path.h.CFB2EE3B98DFF5B1.idx new file mode 100644 index 0000000..e0b101b Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/fs_path.h.CFB2EE3B98DFF5B1.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/iomanip.84619F057E1A059E.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/iomanip.84619F057E1A059E.idx new file mode 100644 index 0000000..9fd2bbc Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/iomanip.84619F057E1A059E.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/libintl.h.929023AD77A09335.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/libintl.h.929023AD77A09335.idx new file mode 100644 index 0000000..b0182fc Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/libintl.h.929023AD77A09335.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.cpp.E84C7DA30F06D692.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.cpp.E84C7DA30F06D692.idx index 470c423..f938517 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.cpp.E84C7DA30F06D692.idx and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.cpp.E84C7DA30F06D692.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.h.0750D488C9967C0E.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.h.0750D488C9967C0E.idx index 636bb0c..e5e6d45 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.h.0750D488C9967C0E.idx and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/loader.h.0750D488C9967C0E.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale.0860B73771FA224D.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale.0860B73771FA224D.idx new file mode 100644 index 0000000..7c72791 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale.0860B73771FA224D.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_conv.h.81B3C2817FCA79B1.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_conv.h.81B3C2817FCA79B1.idx new file mode 100644 index 0000000..20d42f6 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_conv.h.81B3C2817FCA79B1.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_facets_nonio.h.20730E5F19325122.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_facets_nonio.h.20730E5F19325122.idx new file mode 100644 index 0000000..9ed462d Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_facets_nonio.h.20730E5F19325122.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_facets_nonio.tcc.CEE0968DA3330854.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_facets_nonio.tcc.CEE0968DA3330854.idx new file mode 100644 index 0000000..e339211 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/locale_facets_nonio.tcc.CEE0968DA3330854.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.cpp.FDDFA08D245238F2.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.cpp.FDDFA08D245238F2.idx index 63911f3..b8aa6fd 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.cpp.FDDFA08D245238F2.idx and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.cpp.FDDFA08D245238F2.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.h.D9F0255162152630.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.h.D9F0255162152630.idx index 75917fe..c520f37 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.h.D9F0255162152630.idx and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/mainwindow.h.D9F0255162152630.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/messages_members.h.D632BBB576E025EC.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/messages_members.h.D632BBB576E025EC.idx new file mode 100644 index 0000000..ab2af93 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/messages_members.h.D632BBB576E025EC.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qcalendar.h.E59D60B317C5A667.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qcalendar.h.E59D60B317C5A667.idx new file mode 100644 index 0000000..05faba7 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qcalendar.h.E59D60B317C5A667.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdatetime.h.F97CBAAC9A100E4D.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdatetime.h.F97CBAAC9A100E4D.idx new file mode 100644 index 0000000..b503b29 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdatetime.h.F97CBAAC9A100E4D.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdir.h.D5C12FE970EDAAEA.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdir.h.D5C12FE970EDAAEA.idx new file mode 100644 index 0000000..c0a9fc2 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdir.h.D5C12FE970EDAAEA.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdirlisting.h.A4B5734D924B83FC.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdirlisting.h.A4B5734D924B83FC.idx new file mode 100644 index 0000000..14bb4c1 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qdirlisting.h.A4B5734D924B83FC.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfile.h.17B76191B41BEA8B.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfile.h.17B76191B41BEA8B.idx new file mode 100644 index 0000000..8fbbb25 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfile.h.17B76191B41BEA8B.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfiledevice.h.81A9E398FF9D04E4.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfiledevice.h.81A9E398FF9D04E4.idx new file mode 100644 index 0000000..f7f0a09 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfiledevice.h.81A9E398FF9D04E4.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfiledialog.h.46173CFBC109B25E.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfiledialog.h.46173CFBC109B25E.idx new file mode 100644 index 0000000..4f5d307 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfiledialog.h.46173CFBC109B25E.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfileinfo.h.3F65C31B592812D3.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfileinfo.h.3F65C31B592812D3.idx new file mode 100644 index 0000000..d1490e7 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qfileinfo.h.3F65C31B592812D3.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qtimezone.h.9050F1396A7F16CC.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qtimezone.h.9050F1396A7F16CC.idx new file mode 100644 index 0000000..11f5711 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/qtimezone.h.9050F1396A7F16CC.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/quoted_string.h.45DBC20140D8203A.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/quoted_string.h.45DBC20140D8203A.idx new file mode 100644 index 0000000..096371f Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/quoted_string.h.45DBC20140D8203A.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/sstream.294271DEA5614AD6.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/sstream.294271DEA5614AD6.idx new file mode 100644 index 0000000..7cc13dc Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/sstream.294271DEA5614AD6.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/sstream.tcc.119CEF932A2C2164.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/sstream.tcc.119CEF932A2C2164.idx new file mode 100644 index 0000000..01d5c57 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/sstream.tcc.119CEF932A2C2164.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/time_members.h.F4AAD56BAACF342D.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/time_members.h.F4AAD56BAACF342D.idx new file mode 100644 index 0000000..4e50531 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/time_members.h.F4AAD56BAACF342D.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/ui_mainwindow.h.F0588D34DB904819.idx b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/ui_mainwindow.h.F0588D34DB904819.idx index ed088db..ef3ceec 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/ui_mainwindow.h.F0588D34DB904819.idx and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/.qtc_clangd/.cache/clangd/index/ui_mainwindow.h.F0588D34DB904819.idx differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/executor.cpp.o b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/executor.cpp.o new file mode 100644 index 0000000..da20834 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/executor.cpp.o differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/loader.cpp.o b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/loader.cpp.o new file mode 100644 index 0000000..96354d7 Binary files /dev/null and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/loader.cpp.o differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/machine.cpp.o b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/machine.cpp.o index 8f8dd25..ee3441d 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/machine.cpp.o and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/machine.cpp.o differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/main.cpp.o b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/main.cpp.o index eb3160e..a01d43f 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/main.cpp.o and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/main.cpp.o differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/mainwindow.cpp.o b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/mainwindow.cpp.o index f26b107..50fddfc 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/mainwindow.cpp.o and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/mainwindow.cpp.o differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o index 5676d4b..2c3b8cf 100644 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator.dir/simulator_autogen/mocs_compilation.cpp.o differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator_autogen.dir/ParseCache.txt b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator_autogen.dir/ParseCache.txt index 72ea6c5..cd75f87 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator_autogen.dir/ParseCache.txt +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/CMakeFiles/simulator_autogen.dir/ParseCache.txt @@ -1,8 +1,20 @@ # 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/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/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/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/loader.h mdp:/home/aljaz/Desktop/spo/ass2/simulator/machine.h mdp:/home/aljaz/Desktop/spo/ass2/simulator/mainwindow.h mdp:/home/aljaz/Qt/6.10.1/gcc_64/include/QtCore/q17memory.h @@ -454,12 +466,5 @@ 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/machine.h -/home/aljaz/Desktop/spo/ass2/simulator/device.h -/home/aljaz/Desktop/spo/ass2/simulator/machine.cpp /home/aljaz/Desktop/spo/ass2/simulator/opcode.h -/home/aljaz/Desktop/spo/ass2/simulator/main.cpp -/home/aljaz/Desktop/spo/ass2/simulator/opcode.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/machine.cpp diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/Testing/Temporary/LastTest.log b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/Testing/Temporary/LastTest.log index b03a1e2..e891000 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/Testing/Temporary/LastTest.log +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Dec 07 09:37 CET +Start testing: Dec 07 11:47 CET ---------------------------------------------------------- -End testing: Dec 07 09:37 CET +End testing: Dec 07 11:47 CET diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator index 6c56199..365526d 100755 Binary files a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator and b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator differ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp index 1d9d21a..85af098 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp @@ -40,12 +40,15 @@ template <> constexpr inline auto MainWindow::qt_create_metaobjectdata(1, 2, QMC::AccessPrivate, QMetaType::Void), + // Slot 'onLoadTriggered' + QtMocHelpers::SlotData(3, 2, QMC::AccessPrivate, QMetaType::Void), }; QtMocHelpers::UintData qt_properties { }; @@ -70,6 +73,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: _t->on_readButton_clicked(); break; + case 1: _t->onLoadTriggered(); break; default: ; } } @@ -95,14 +99,14 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 1) + if (_id < 2) qt_static_metacall(this, _c, _id, _a); - _id -= 1; + _id -= 2; } if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 1) + if (_id < 2) *reinterpret_cast(_a[0]) = QMetaType(); - _id -= 1; + _id -= 2; } return _id; } diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp.d b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp.d index 06a333c..10e3af5 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp.d +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/EWIEGA46WW/moc_mainwindow.cpp.d @@ -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/loader.h \ /home/aljaz/Desktop/spo/ass2/simulator/machine.h \ /home/aljaz/Qt/6.10.1/gcc_64/include/QtCore/q17memory.h \ /home/aljaz/Qt/6.10.1/gcc_64/include/QtCore/q20functional.h \ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/deps b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/deps index cdefd06..314fabc 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/deps +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/deps @@ -7,6 +7,10 @@ simulator_autogen/timestamp: \ /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.cpp \ /home/aljaz/Desktop/spo/ass2/simulator/device.h \ + /home/aljaz/Desktop/spo/ass2/simulator/executor.cpp \ + /home/aljaz/Desktop/spo/ass2/simulator/executor.h \ + /home/aljaz/Desktop/spo/ass2/simulator/loader.cpp \ + /home/aljaz/Desktop/spo/ass2/simulator/loader.h \ /home/aljaz/Desktop/spo/ass2/simulator/machine.cpp \ /home/aljaz/Desktop/spo/ass2/simulator/machine.h \ /home/aljaz/Desktop/spo/ass2/simulator/main.cpp \ diff --git a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/include/ui_mainwindow.h b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/include/ui_mainwindow.h index 45e934c..77d552c 100644 --- a/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/include/ui_mainwindow.h +++ b/ass2/simulator/build/Desktop_Qt_6_10_1-Debug/simulator_autogen/include/ui_mainwindow.h @@ -46,11 +46,11 @@ public: QGroupBox *groupBox_3; QWidget *gridLayoutWidget_3; QGridLayout *gridLayout_3; - QWidget *widget; + QWidget *layoutWidget; QVBoxLayout *verticalLayout; QLabel *label; QTableWidget *tableWidget; - QWidget *widget1; + QWidget *layoutWidget1; QHBoxLayout *horizontalLayout_2; QHBoxLayout *horizontalLayout; QLineEdit *addressLineEdit; @@ -60,7 +60,7 @@ public: QPushButton *pushButton_2; QPushButton *pushButton; QMenuBar *menubar; - QMenu *menuMenu; + QMenu *menuLoad; QMenu *menuVizitka; QStatusBar *statusbar; @@ -68,7 +68,7 @@ public: { if (MainWindow->objectName().isEmpty()) MainWindow->setObjectName("MainWindow"); - MainWindow->resize(1657, 915); + MainWindow->resize(844, 757); actionExit = new QAction(MainWindow); actionExit->setObjectName("actionExit"); centralwidget = new QWidget(MainWindow); @@ -110,18 +110,18 @@ public: gridLayout_3 = new QGridLayout(gridLayoutWidget_3); gridLayout_3->setObjectName("gridLayout_3"); gridLayout_3->setContentsMargins(0, 0, 0, 0); - widget = new QWidget(centralwidget); - widget->setObjectName("widget"); - widget->setGeometry(QRect(1070, 190, 581, 641)); - verticalLayout = new QVBoxLayout(widget); + layoutWidget = new QWidget(centralwidget); + layoutWidget->setObjectName("layoutWidget"); + layoutWidget->setGeometry(QRect(240, 20, 581, 641)); + verticalLayout = new QVBoxLayout(layoutWidget); verticalLayout->setObjectName("verticalLayout"); verticalLayout->setContentsMargins(0, 0, 0, 0); - label = new QLabel(widget); + label = new QLabel(layoutWidget); label->setObjectName("label"); verticalLayout->addWidget(label); - tableWidget = new QTableWidget(widget); + tableWidget = new QTableWidget(layoutWidget); if (tableWidget->columnCount() < 16) tableWidget->setColumnCount(16); if (tableWidget->rowCount() < 40) @@ -134,30 +134,30 @@ public: tableWidget->horizontalHeader()->setDefaultSectionSize(34); tableWidget->horizontalHeader()->setProperty("showSortIndicator", QVariant(false)); tableWidget->verticalHeader()->setMinimumSectionSize(14); - tableWidget->verticalHeader()->setDefaultSectionSize(3); + tableWidget->verticalHeader()->setDefaultSectionSize(14); tableWidget->verticalHeader()->setHighlightSections(true); verticalLayout->addWidget(tableWidget); - widget1 = new QWidget(centralwidget); - widget1->setObjectName("widget1"); - widget1->setGeometry(QRect(1070, 850, 571, 27)); - horizontalLayout_2 = new QHBoxLayout(widget1); + layoutWidget1 = new QWidget(centralwidget); + layoutWidget1->setObjectName("layoutWidget1"); + layoutWidget1->setGeometry(QRect(240, 680, 571, 27)); + horizontalLayout_2 = new QHBoxLayout(layoutWidget1); horizontalLayout_2->setObjectName("horizontalLayout_2"); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); horizontalLayout = new QHBoxLayout(); horizontalLayout->setObjectName("horizontalLayout"); - addressLineEdit = new QLineEdit(widget1); + addressLineEdit = new QLineEdit(layoutWidget1); addressLineEdit->setObjectName("addressLineEdit"); horizontalLayout->addWidget(addressLineEdit); - valueLabel = new QLabel(widget1); + valueLabel = new QLabel(layoutWidget1); valueLabel->setObjectName("valueLabel"); horizontalLayout->addWidget(valueLabel); - readButton = new QPushButton(widget1); + readButton = new QPushButton(layoutWidget1); readButton->setObjectName("readButton"); horizontalLayout->addWidget(readButton); @@ -169,12 +169,12 @@ public: horizontalLayout_2->addLayout(horizontalLayout); - pushButton_2 = new QPushButton(widget1); + pushButton_2 = new QPushButton(layoutWidget1); pushButton_2->setObjectName("pushButton_2"); horizontalLayout_2->addWidget(pushButton_2); - pushButton = new QPushButton(widget1); + pushButton = new QPushButton(layoutWidget1); pushButton->setObjectName("pushButton"); horizontalLayout_2->addWidget(pushButton); @@ -182,9 +182,9 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); menubar->setObjectName("menubar"); - menubar->setGeometry(QRect(0, 0, 1657, 20)); - menuMenu = new QMenu(menubar); - menuMenu->setObjectName("menuMenu"); + menubar->setGeometry(QRect(0, 0, 844, 20)); + menuLoad = new QMenu(menubar); + menuLoad->setObjectName("menuLoad"); menuVizitka = new QMenu(menubar); menuVizitka->setObjectName("menuVizitka"); MainWindow->setMenuBar(menubar); @@ -192,9 +192,8 @@ public: statusbar->setObjectName("statusbar"); MainWindow->setStatusBar(statusbar); - menubar->addAction(menuMenu->menuAction()); + menubar->addAction(menuLoad->menuAction()); menubar->addAction(menuVizitka->menuAction()); - menuMenu->addAction(actionExit); retranslateUi(MainWindow); @@ -217,7 +216,7 @@ public: readButton->setText(QCoreApplication::translate("MainWindow", "Preberi", nullptr)); pushButton_2->setText(QCoreApplication::translate("MainWindow", "Levo", nullptr)); pushButton->setText(QCoreApplication::translate("MainWindow", "Desno", nullptr)); - menuMenu->setTitle(QCoreApplication::translate("MainWindow", "Menu", nullptr)); + menuLoad->setTitle(QCoreApplication::translate("MainWindow", "Menu", nullptr)); menuVizitka->setTitle(QCoreApplication::translate("MainWindow", "Vizitka", nullptr)); } // retranslateUi diff --git a/ass2/simulator/executor.cpp b/ass2/simulator/executor.cpp index e38c4bc..b74f6c1 100644 --- a/ass2/simulator/executor.cpp +++ b/ass2/simulator/executor.cpp @@ -1,5 +1,5 @@ #include "executor.h" -#include "machine.cpp" +#include "machine.h" #include #include diff --git a/ass2/simulator/loader.cpp b/ass2/simulator/loader.cpp index 8478618..957e557 100644 --- a/ass2/simulator/loader.cpp +++ b/ass2/simulator/loader.cpp @@ -1,3 +1,73 @@ #include "loader.h" +#include "machine.h" Loader::Loader() {} + +int Loader::readByte(std::istream &in) { + char c1, c2; + if (!in.get(c1) || !in.get(c2)) { + return -1; + } + 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++) { + int byte = readByte(in); + if (byte < 0) return -1; + result = (result << 8) | byte; + } + return result; +} + +std::string Loader::readString(std::istream &in, int len) { + std::string result; + for (int i = 0; i < len; i++) { + char c; + if (!in.get(c)) break; + result += c; + } + return result; +} + +bool Loader::loadSection(Machine& machine, std::istream& stream) { + if (stream.get() != 'H') return false; + cout << readString(stream, 6)<< endl; // ime programa ignoriramo + int start = readWord(stream); + int length = readWord(stream); + if (stream.peek() == '\r' || stream.peek() == '\n') stream.get(); + // Preberi text zapise + int ch = stream.get(); + while (ch == 'T') { + int loc = readWord(stream); + int len = readByte(stream); + while (len-- > 0) { + if (loc < start || loc >= start + length) return false; + int val = readByte(stream); + machine.writeByte(loc++, static_cast(val)); + } + if (stream.peek() == '\r' ||stream.peek() == '\n') stream.get(); + ch = stream.get(); + } + + // End zapis + if (ch != 'E') return false; + machine.setPC(readWord(stream)); + + return true; +} + +bool Loader::loadObj(Machine& machine, const std::string& filename) { + std::ifstream file(filename); + if (!file.is_open()) { + std::cerr << "Napaka pri odpiranju datoteke: " << filename << "\n"; + return false; + } + return loadSection(machine, file); +} + diff --git a/ass2/simulator/loader.h b/ass2/simulator/loader.h index 4c7fe87..126967b 100644 --- a/ass2/simulator/loader.h +++ b/ass2/simulator/loader.h @@ -1,19 +1,28 @@ #ifndef LOADER_H #define LOADER_H -#include +#include + +class Machine; class Loader { +private: +Machine* machine; + public: Loader(); // Prebere niz dolžine len - std::string readString(string &r, int len); + std::string readString(std::istream &in, int len); // Prebere en bajt (2 heksadecimalni znaka) - int readByte(std::string &r); + int readByte(std::istream &in); // Prebere eno "besedo" (3 bajte = 6 heksadecimalnih znakov) - int readWord(std::string &r); + int readWord(std::istream &in); + + bool loadSection(Machine& machine, std::istream& stream); + + bool loadObj(Machine& machine, const std::string& filename); }; #endif // LOADER_H diff --git a/ass2/simulator/machine.h b/ass2/simulator/machine.h index 0e4847d..e3715a2 100644 --- a/ass2/simulator/machine.h +++ b/ass2/simulator/machine.h @@ -68,8 +68,6 @@ public: bool execF2(int opcode, int operand); bool execSICF3F4(int opcode, int ni, int operand); - - bool loadSection(Reader r); }; #endif diff --git a/ass2/simulator/mainwindow.cpp b/ass2/simulator/mainwindow.cpp index 33a49e7..b853b0c 100644 --- a/ass2/simulator/mainwindow.cpp +++ b/ass2/simulator/mainwindow.cpp @@ -1,12 +1,17 @@ #include "mainwindow.h" #include "ui_mainwindow.h" #include +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); + QAction *actionLoad = new QAction(tr("Load"), this); + ui->menuLoad->addAction(actionLoad); + + connect(actionLoad, &QAction::triggered, this, &MainWindow::onLoadTriggered); } MainWindow::~MainWindow() @@ -24,9 +29,19 @@ void MainWindow::on_readButton_clicked() } try { - unsigned char val = m.readByte(addr); + unsigned char val = machine.readByte(addr); ui->valueLabel->setText(QString::number(val)); } catch (const std::out_of_range &e) { QMessageBox::warning(this, "Napaka", "Naslov je izven meje pomnilnika!"); } } + +void MainWindow::onLoadTriggered() { + QString filename = QFileDialog::getOpenFileName(this, tr("Open Object File"), "", tr("Object Files (*.obj)")); + if (!filename.isEmpty()) { + bool ok = loader.loadObj(machine, filename.toStdString()); + if (!ok) { + QMessageBox::warning(this, tr("Error"), tr("Failed to load file")); + } + } +} diff --git a/ass2/simulator/mainwindow.h b/ass2/simulator/mainwindow.h index 730bfcf..fefe13f 100644 --- a/ass2/simulator/mainwindow.h +++ b/ass2/simulator/mainwindow.h @@ -3,6 +3,8 @@ #include #include "machine.h" +#include "loader.h" + QT_BEGIN_NAMESPACE namespace Ui { @@ -20,9 +22,11 @@ public: private slots: void on_readButton_clicked(); + void onLoadTriggered(); private: Ui::MainWindow *ui; - Machine m; + Machine machine; + Loader loader; }; #endif // MAINWINDOW_H diff --git a/ass2/simulator/mainwindow.ui b/ass2/simulator/mainwindow.ui index c12b806..2fc7e3d 100644 --- a/ass2/simulator/mainwindow.ui +++ b/ass2/simulator/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 1657 - 915 + 844 + 757 @@ -101,11 +101,11 @@ - + - 1070 - 190 + 240 + 20 581 641 @@ -142,7 +142,7 @@ 14 - 3 + 14 true @@ -207,11 +207,11 @@ - + - 1070 - 850 + 240 + 680 571 27 @@ -280,22 +280,21 @@ 0 0 - 1657 + 844 20 - + Menu - Vizitka - +