summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-02-28 10:35:25 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-02-28 10:35:25 +0100
commit668d324fab71e2c5b18e123cbaf4a9bf00fa689d (patch)
tree90bac928b3c9339c416bc8220ed541d645fb948b
parent11dc3ca142df08d9c1bc73f96a2eb93ead4f6924 (diff)
Toolchain: Add copyright banner, cleaned up code.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
-rw-r--r--Private/Toolchain/32asm.cc14
-rw-r--r--Private/Toolchain/64asm.cc8
-rw-r--r--Private/Toolchain/i64asm.cc8
-rw-r--r--Private/Toolchain/link.cc8
4 files changed, 36 insertions, 2 deletions
diff --git a/Private/Toolchain/32asm.cc b/Private/Toolchain/32asm.cc
index dabacb7..642b3d0 100644
--- a/Private/Toolchain/32asm.cc
+++ b/Private/Toolchain/32asm.cc
@@ -41,10 +41,22 @@
#define kWhite "\e[0;97m"
#define kYellow "\e[0;33m"
+#define kStdOut (std::cout << kWhite)
+#define kStdErr (std::cout << kRed)
+
/////////////////////////////////////////////////////////////////////////////////////////
// @brief 32x0 Assembler entrypoint, the program/module starts here.
/////////////////////////////////////////////////////////////////////////////////////////
-MPCC_MODULE(HCoreAssembler32000) { return 0; }
+MPCC_MODULE(HCoreAssembler32000) {
+ kStdOut << "MahroussLogic (R) Visual Assembler.";
+ kStdOut << "Warning: This computer program is protected by copyright "
+ "law and international treaties.\r\nUnauthorized reproduction "
+ "or distribution of this program, or any portion of it,\r\nmay "
+ "result in severe civil and criminal penalties, and will be "
+ "prosecuted to the maximum extent possible under the law.\r\n\r\n";
+
+ return 0;
+}
diff --git a/Private/Toolchain/64asm.cc b/Private/Toolchain/64asm.cc
index 982de95..0ee6fe7 100644
--- a/Private/Toolchain/64asm.cc
+++ b/Private/Toolchain/64asm.cc
@@ -104,6 +104,14 @@ void print_warning(std::string reason, const std::string &file) noexcept {
/////////////////////////////////////////////////////////////////////////////////////////
MPCC_MODULE(HCoreAssembler64000) {
+ kStdOut << "MahroussLogic (R) Visual Assembler.\r\n";
+ kStdOut << "Warning: This computer program is protected by copyright "
+ "law and international treaties.\r\nUnauthorized reproduction "
+ "or distribution of this program, or any portion of it,\r\nmay "
+ "result in severe civil and criminal penalties, and will be "
+ "prosecuted to the maximum extent possible under the law.\r\n\r\n";
+
+
for (size_t i = 1; i < argc; ++i) {
if (argv[i][0] == '-') {
if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) {
diff --git a/Private/Toolchain/i64asm.cc b/Private/Toolchain/i64asm.cc
index 95e722b..9722d5c 100644
--- a/Private/Toolchain/i64asm.cc
+++ b/Private/Toolchain/i64asm.cc
@@ -105,6 +105,13 @@ void print_warning(std::string reason, const std::string &file) noexcept {
/////////////////////////////////////////////////////////////////////////////////////////
MPCC_MODULE(HCoreAssemblerAMD64) {
+ kStdOut << "MahroussLogic (R) Visual Assembler.\r\n";
+ kStdOut << "Warning: This computer program is protected by copyright "
+ "law and international treaties.\r\nUnauthorized reproduction "
+ "or distribution of this program, or any portion of it,\r\nmay "
+ "result in severe civil and criminal penalties, and will be "
+ "prosecuted to the maximum extent possible under the law.\r\n\r\n";
+
//////////////// CPU OPCODES BEGIN ////////////////
std::string opcodes_jump[kJumpLimit] = {
@@ -152,7 +159,6 @@ MPCC_MODULE(HCoreAssemblerAMD64) {
kStdOut << "-version: Print program version.\n";
kStdOut << "-verbose: Print verbose output.\n";
kStdOut << "-binary: Output as flat binary.\n";
- kStdOut << "-64xxx: Compile for a subset of the X64000.\n";
return 0;
} else if (strcmp(argv[i], "-binary") == 0) {
diff --git a/Private/Toolchain/link.cc b/Private/Toolchain/link.cc
index c1b49e6..7ddea64 100644
--- a/Private/Toolchain/link.cc
+++ b/Private/Toolchain/link.cc
@@ -71,6 +71,14 @@ static std::vector<std::string> kObjectList;
static std::vector<char> kObjectBytes;
MPCC_MODULE(HCoreLinker) {
+ kStdOut << "MahroussLogic (R) Visual Linker.\r\n";
+ kStdOut << "Warning: This computer program is protected by copyright "
+ "law and international treaties.\r\nUnauthorized reproduction "
+ "or distribution of this program, or any portion of it,\r\nmay "
+ "result in severe civil and criminal penalties, and will be "
+ "prosecuted to the maximum extent possible under the law.\r\n\r\n";
+
+
bool is_executable = true;
/**