Implement instructions 0x03C-0x053, add flag constants and fix execute pipeline #5

Merged
Kittycannon merged 4 commits from diego/instruc-03c-053 into main 2026-04-09 01:14:03 +00:00
3 changed files with 47 additions and 1 deletions
Showing only changes of commit 0184ef6394 - Show all commits

View File

@@ -884,6 +884,11 @@ namespace spider {
// Operation: // Operation:
void UPY(); void UPY();
// [Easter Eggs] 0x0F6 — DGANT: "In kaaba Spider" (Yucatec Maya: My name is Spider)
// Params: 0 | AddrMask1: 00 AddrMask2: 00 | TypeMask: 00
// Operation: Writes "IN KAABA SPIDER" one char per GP register
void DGANT();
// </pygen-target> // // </pygen-target> //
}; };

View File

@@ -281,7 +281,7 @@ CPU::Fn CPU::instrMap[] = {
nullptr, // 0x0F3 nullptr, // 0x0F3
nullptr, // 0x0F4 nullptr, // 0x0F4
nullptr, // 0x0F5 nullptr, // 0x0F5
nullptr, // 0x0F6 &CPU::DGANT, // 0x0F6
nullptr, // 0x0F7 nullptr, // 0x0F7
nullptr, // 0x0F8 nullptr, // 0x0F8
nullptr, // 0x0F9 nullptr, // 0x0F9

View File

@@ -4,6 +4,7 @@
*/ */
#include <spider/runtime/cpu/CPU.hpp> #include <spider/runtime/cpu/CPU.hpp>
#include <spider/runtime/memory/RAM.hpp>
namespace spider { namespace spider {
@@ -11,4 +12,44 @@ namespace spider {
// TODO: Implement UPY // TODO: Implement UPY
} }
// ── 0x0F6 — DGANT: "I'm SpiderLang" in a spider web ────────────
void CPU::DGANT() {
const char art[] =
R"(\ | //)"
R"( \-+-// )"
R"( -- + --)"
R"( //-+-\ )"
R"(// | \)"
R"( )"
R"( I ' M )"
R"( SPIDER )"
R"( LANG )"
R"( )"
R"(\ | //)"
R"( \-+-// )"
R"(-- + -- )"
R"( /-+-\ )"
R"(/ | \ )"
R"( || )"
R"( || )"
R"( || )"
R"(\ | / )"
R"( \-+-/ )"
R"(-- + -- )"
R"( /-+-\ )"
R"(/ | \ )"
R"( || )"
R"( || )"
R"( || )"
R"(\ | / )"
R"( \-+-/ )"
R"(-- + -- )"
R"( /-+-\ )"
R"(/ | \ )"
R"( || )";
for (u16 i = 0; i < sizeof(art) - 1; i++) {
_ram->at(i) = static_cast<u8>(art[i]);
}
}
} }