Files
2026-05-02 16:06:42 -04:00

112 lines
5.0 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
<style>
.bg{fill:#0a0a0f}.pnl{fill:#12121a;stroke:#1a1a2e}.hdr{fill:#12121a}
.title{font:bold 42px 'Courier New',monospace;fill:#00ff41}
.sub{font:bold 28px 'Courier New',monospace;fill:#00d4ff}
.txt{font:24px 'Courier New',monospace;fill:#c0c0c0}
.dim{font:20px 'Courier New',monospace;fill:#888}
.grn{font:bold 24px 'Courier New',monospace;fill:#00ff41}
.red{font:bold 24px 'Courier New',monospace;fill:#ff0040}
.cyn{font:bold 24px 'Courier New',monospace;fill:#00d4ff}
.amb{font:bold 24px 'Courier New',monospace;fill:#ffaa00}
.badge{stroke:#00ff41;rx:14}
</style>
<rect class="bg" width="1200" height="800"/>
<!-- Title -->
<text x="600" y="52" text-anchor="middle" class="title">ARM Cortex-M33 Regs</text>
<text x="600" y="88" text-anchor="middle" class="dim">ARM Architecture &amp; Registers</text>
<!-- Left Panel -->
<rect x="30" y="105" width="520" height="675" class="pnl" rx="8"/>
<text x="290" y="148" text-anchor="middle" class="sub">Key Registers</text>
<line x1="50" y1="163" x2="530" y2="163" stroke="#1a1a2e"/>
<!-- r0 -->
<rect x="55" y="182" width="190" height="50" rx="6" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
<text x="150" y="215" text-anchor="middle" class="grn">r0</text>
<text x="260" y="215" class="amb">Arg 1 / Return</text>
<!-- r1 -->
<rect x="55" y="246" width="190" height="50" rx="6" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
<text x="150" y="279" text-anchor="middle" class="grn">r1</text>
<text x="260" y="279" class="amb">Arg 2</text>
<!-- r2 -->
<rect x="55" y="310" width="190" height="50" rx="6" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
<text x="150" y="343" text-anchor="middle" class="grn">r2</text>
<text x="260" y="343" class="amb">Arg 3</text>
<!-- r3 -->
<rect x="55" y="374" width="190" height="50" rx="6" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
<text x="150" y="407" text-anchor="middle" class="grn">r3</text>
<text x="260" y="407" class="amb">Arg 4</text>
<!-- Divider -->
<line x1="55" y1="444" x2="530" y2="444" stroke="#ffaa00" stroke-width="2" stroke-dasharray="8"/>
<text x="55" y="473" class="dim" style="fill:#ffaa00">r0-r3 Caller-saved</text>
<text x="55" y="500" class="dim" style="fill:#00d4ff">r4-r11 Callee-saved</text>
<!-- SP -->
<rect x="55" y="525" width="475" height="50" rx="6" fill="#1a0f0f" stroke="#ff0040" stroke-width="2"/>
<text x="75" y="558" class="red">SP (r13)</text>
<text x="310" y="558" class="txt">Stack Ptr</text>
<!-- LR -->
<rect x="55" y="590" width="475" height="50" rx="6" fill="#0f1a1a" stroke="#00d4ff" stroke-width="2"/>
<text x="75" y="623" class="cyn">LR (r14)</text>
<text x="310" y="623" class="txt">Return Addr</text>
<!-- PC -->
<rect x="55" y="655" width="475" height="50" rx="6" fill="#0f1a1a" stroke="#00d4ff" stroke-width="2"/>
<text x="75" y="688" class="cyn">PC (r15)</text>
<text x="310" y="688" class="txt">Next Instr</text>
<!-- xPSR -->
<rect x="55" y="720" width="475" height="50" rx="6" fill="#1a1a0f" stroke="#ffaa00" stroke-width="2"/>
<text x="75" y="753" class="amb">xPSR</text>
<text x="310" y="753" class="txt">Status Flags</text>
<!-- Right Panel -->
<rect x="580" y="105" width="590" height="675" class="pnl" rx="8"/>
<text x="875" y="148" text-anchor="middle" class="sub">Function Call Flow</text>
<line x1="600" y1="163" x2="1150" y2="163" stroke="#1a1a2e"/>
<!-- main box -->
<rect x="640" y="205" width="190" height="70" rx="10" fill="#12121a" stroke="#00ff41" stroke-width="2"/>
<text x="735" y="250" text-anchor="middle" class="grn">main()</text>
<!-- BL arrow -->
<line x1="830" y1="240" x2="920" y2="240" stroke="#ffaa00" stroke-width="4"/>
<polygon points="920,231 940,240 920,249" fill="#ffaa00"/>
<text x="875" y="225" text-anchor="middle" class="dim" style="fill:#ffaa00">BL</text>
<!-- func box -->
<rect x="945" y="205" width="190" height="70" rx="10" fill="#12121a" stroke="#00d4ff" stroke-width="2"/>
<text x="1040" y="250" text-anchor="middle" class="cyn">func()</text>
<!-- Return arrow -->
<line x1="945" y1="310" x2="830" y2="310" stroke="#ff0040" stroke-width="4"/>
<polygon points="830,301 810,310 830,319" fill="#ff0040"/>
<text x="888" y="345" text-anchor="middle" class="dim" style="fill:#ff0040">BX LR</text>
<!-- Separator -->
<line x1="600" y1="380" x2="1150" y2="380" stroke="#1a1a2e"/>
<!-- Facts -->
<text x="620" y="420" class="sub">How It Works</text>
<text x="620" y="455" class="amb">r0 = first argument</text>
<text x="620" y="487" class="txt">puts(r0) passes the</text>
<text x="620" y="519" class="txt">string address in r0</text>
<line x1="600" y1="562" x2="1150" y2="562" stroke="#1a1a2e"/>
<text x="620" y="600" class="cyn">LR saves return addr</text>
<text x="620" y="635" class="txt">BL: PC+4 stored in LR</text>
<text x="620" y="670" class="txt">BX LR: jump back</text>
<line x1="600" y1="707" x2="1150" y2="707" stroke="#1a1a2e"/>
<text x="620" y="745" class="dim">All registers: 32 bits wide</text>
</svg>