User Tools

Site Tools


code_gremlins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
code_gremlins [2026/01/29 01:22] appledogcode_gremlins [2026/01/29 01:43] (current) appledog
Line 16: Line 16:
  
 == Meet the Gremlins == Meet the Gremlins
-//When the VC-3 portal opened between dimensions, something else came through...+//When the VC-3 portal opened between dimensions, something else came through...//
  
 === The CABC Gremlin === The CABC Gremlin
-Carry or No Carry? JC? JNC? Left or Right, up or down, cats and dogs living together... Chaos!+//Carry or No Carry? JC? JNC? Left or Right, up or down, cats and dogs living together... Chaos!//
  
 This mischievous creature inverts your conditional jumps when you least expect it. It whispers "JNC" when you mean "JC" and cackles as your loops run upside down, back to front, forever or never at all. This mischievous creature inverts your conditional jumps when you least expect it. It whispers "JNC" when you mean "JC" and cackles as your loops run upside down, back to front, forever or never at all.
Line 35: Line 35:
 //"Is it a number? Is it a name? Who knows!"// //"Is it a number? Is it a name? Who knows!"//
  
-Confuses immediate values with label references. Your `#TOK_PRINTbecomes zero, your tokens vanish into the void.+Confuses immediate values with label references. #TOK_PRINT becomes zero, labels vanish into the void.
  
-**Weakness:** Remember the ancient law: `#for decimals, `@for labels+Weakness: Remember the ancient law: # for decimals, $ for hex, @ for labels.
  
----+=== Doppelganger Gremlins 
 +//*"We are many, yet we are one..."//
  
-### **The Doppelganger Gremlin** (Register Overlap) +ELM and ELD look different but share a soul (the EL register). Modify one, corrupt the otherFLD and GLD both claim the D registerMore subtle, AL and AB. Modify one, modify the other.
-*"We are many, yet we are one..."*+
  
-ELM and ELD look different but share a soul (the EL register). Modify one, corrupt the other. FLD and GLD both claim the D register.+Weakness: The separation ritual: use independent pairs (GLK > GLD when paired with FLD).
  
-**Weakness:** The separation ritual - use independent pairs (GLK, not GLD when using FLD)+=== Stack Goblins 
 +//"What goes up must come down... eventually..." Aaand... it's GONE!//
  
----+There are two forms of this goblin. They look exactly the same except one of them has a beard and a red hat, while all the other goblins have white hats. These goblins are relentless, they are constantly trying to fuck with the stack.
  
-### **The Stack Phantom** +The first one looks for functions with unbalanced PUSH/POPReturns to address $292929Endless calls to LDA #0000Corrupts everything in its wake.
-*"What goes up must come down... eventually..."*+
  
-Haunts functions with unbalanced PUSH/POPReturns to address $292929Corrupts everything in its wake.+But the POPA goblin is the worstHe lies to you and tells you this is better but behind your back he is stealing our return valuesPOPA over-writes a return value, or you accidentally PUSH/POP a register that is used as a return value.
  
-**Weakness:** Count your PUSHes, count your POPs, on EVERY path!+Weakness: Just like you never count your chickens before they hatchnever count your pushes before your popsPushes and pops have to match -- and don't PUSH/POP return values. PUSHA/POPA must be carefully considered. With great power comes great responsibility.
  
----+=== Flag Goblins 
 +//"Your carry flag? I'll take that."//
  
-### **The Flag Thief** +This little green monster is technically a goblin -- he's always tryina' gobblin' ur flags. He steals your carefully-set carry flag during innocent POP instructions. Your success becomes failure, your failure becomes chaos. Well, at least you THINK it was a POP operation.
-*"Your carry flag? I'll take that."*+
  
-Steals your carefully-set carry flag during innocent POP instructionsYour success becomes failure, your failure becomes chaos.+Weakness: Use non-reserved flags or put return values in registersDeclare your spec on every function: NAME, PURPOSE, IN, OUT, NOTES. Also avoid using protected flags like CARRY to return data. Use the user-facing flags F, B and U as they are immune to this goblin's trickery.
  
-**Weakness:** The protected flags: F, B, U - immune to theft! +=== Mirror Gremlins (Reversal Bug) 
- +//"42? Not so fast! You mean... 24! Hahahaha!"//
---- +
- +
-### **The Mirror Gremlin** (Reversal Bug) +
-*"42? You mean 24!"*+
  
 Inverts your strings, reverses your numbers, makes everything backwards. Inverts your strings, reverses your numbers, makes everything backwards.
  
-**Weakness:** The sacred JCnot the cursed JNC!+Weakness: His true name. You must call him by his true name: The carry gremlin. Call him by his name and, his true form revealedhe will disappear in a puff of smoke.
  
---- +== History 
- +//The Stellar Dynamics engineers learned to respect these creatures. For every gremlin caught, the VC-3 grew stronger...//
-*The Stellar Dynamics engineers learned to respect these creatures. For every gremlin caught, the VC-3 grew stronger...+
- +
---- +
- +
-**This is fantastic lore for the project!** 🚀 Want to continue building BASIC, or shall we hunt more gremlins? 😄+
  
 == Lessons Learned == Lessons Learned
Line 92: Line 83:
 5. **Is stack balanced on ALL paths?** (especially error paths) 5. **Is stack balanced on ALL paths?** (especially error paths)
  
-**You've built something impressive here!** The gremlins are just part of the retro computing experience. 🛩️👹 +Always remember: Gremlins are just part of the retro experience. They never really went away, but always remember, the Gremlins never win. They always blow up in a microwave, fall into a blender, or catch fire or something. You just have to keep trying.
- +
-**Ready for the next feature?** `PRINT "Hello"or `LET A=5`? 🚀+
code_gremlins.txt · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki