mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-05-20 06:44:41 +02:00
110 lines
5.2 KiB
XML
110 lines
5.2 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">Little-Endian Bytes</text>
|
|
<text x="600" y="88" text-anchor="middle" class="dim">Byte Ordering</text>
|
|
|
|
<!-- Left Panel: Visual Example -->
|
|
<rect x="30" y="105" width="540" height="675" class="pnl" rx="8"/>
|
|
<text x="300" y="148" text-anchor="middle" class="sub">Byte Ordering</text>
|
|
<line x1="50" y1="163" x2="550" y2="163" stroke="#1a1a2e"/>
|
|
|
|
<!-- The value -->
|
|
<text x="300" y="210" text-anchor="middle" class="grn">0xDEADBEEF</text>
|
|
|
|
<!-- Big Endian section -->
|
|
<text x="55" y="260" class="red">Big-Endian</text>
|
|
<text x="300" y="260" class="dim">MSB first</text>
|
|
|
|
<rect x="55" y="280" width="110" height="55" rx="4" fill="#1a0f0f" stroke="#ff0040" stroke-width="2"/>
|
|
<text x="110" y="315" text-anchor="middle" class="txt">DE</text>
|
|
|
|
<rect x="175" y="280" width="110" height="55" rx="4" fill="#1a0f0f" stroke="#ff0040" stroke-width="2"/>
|
|
<text x="230" y="315" text-anchor="middle" class="txt">AD</text>
|
|
|
|
<rect x="295" y="280" width="110" height="55" rx="4" fill="#1a0f0f" stroke="#ff0040" stroke-width="2"/>
|
|
<text x="350" y="315" text-anchor="middle" class="txt">BE</text>
|
|
|
|
<rect x="415" y="280" width="110" height="55" rx="4" fill="#1a0f0f" stroke="#ff0040" stroke-width="2"/>
|
|
<text x="470" y="315" text-anchor="middle" class="txt">EF</text>
|
|
|
|
<!-- Address labels -->
|
|
<text x="110" y="360" text-anchor="middle" class="dim">+0</text>
|
|
<text x="230" y="360" text-anchor="middle" class="dim">+1</text>
|
|
<text x="350" y="360" text-anchor="middle" class="dim">+2</text>
|
|
<text x="470" y="360" text-anchor="middle" class="dim">+3</text>
|
|
|
|
<!-- Spacer -->
|
|
<text x="300" y="420" text-anchor="middle" class="amb">vs</text>
|
|
|
|
<!-- Little Endian section -->
|
|
<text x="55" y="470" class="grn">Little-Endian</text>
|
|
<text x="300" y="470" class="dim">LSB first</text>
|
|
|
|
<rect x="55" y="490" width="110" height="55" rx="4" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
|
|
<text x="110" y="525" text-anchor="middle" class="txt">EF</text>
|
|
|
|
<rect x="175" y="490" width="110" height="55" rx="4" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
|
|
<text x="230" y="525" text-anchor="middle" class="txt">BE</text>
|
|
|
|
<rect x="295" y="490" width="110" height="55" rx="4" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
|
|
<text x="350" y="525" text-anchor="middle" class="txt">AD</text>
|
|
|
|
<rect x="415" y="490" width="110" height="55" rx="4" fill="#0f1a0f" stroke="#00ff41" stroke-width="2"/>
|
|
<text x="470" y="525" text-anchor="middle" class="txt">DE</text>
|
|
|
|
<!-- Address labels -->
|
|
<text x="110" y="570" text-anchor="middle" class="dim">+0</text>
|
|
<text x="230" y="570" text-anchor="middle" class="dim">+1</text>
|
|
<text x="350" y="570" text-anchor="middle" class="dim">+2</text>
|
|
<text x="470" y="570" text-anchor="middle" class="dim">+3</text>
|
|
|
|
<!-- Summary text below -->
|
|
<text x="300" y="630" text-anchor="middle" class="amb">Bytes are reversed!</text>
|
|
<text x="300" y="670" text-anchor="middle" class="txt">Lowest address holds</text>
|
|
<text x="300" y="710" text-anchor="middle" class="txt">least significant byte</text>
|
|
<text x="300" y="750" text-anchor="middle" class="dim">ARM uses little-endian</text>
|
|
|
|
<!-- Right Panel: Key Concepts -->
|
|
<rect x="600" y="105" width="570" height="675" class="pnl" rx="8"/>
|
|
<text x="885" y="148" text-anchor="middle" class="sub">Key Concepts</text>
|
|
<line x1="620" y1="163" x2="1150" y2="163" stroke="#1a1a2e"/>
|
|
|
|
<text x="625" y="205" class="cyn">ARM = Little-Endian</text>
|
|
<text x="625" y="240" class="txt">Cortex-M33 uses LE</text>
|
|
<text x="625" y="272" class="txt">by default</text>
|
|
<text x="625" y="304" class="dim">Also: x86, RISC-V</text>
|
|
|
|
<line x1="620" y1="332" x2="1150" y2="332" stroke="#1a1a2e"/>
|
|
|
|
<text x="625" y="372" class="red">Why It Matters</text>
|
|
<text x="625" y="407" class="txt">Memory dumps show</text>
|
|
<text x="625" y="439" class="txt">raw byte order</text>
|
|
<text x="625" y="471" class="txt">Must mentally flip</text>
|
|
<text x="625" y="503" class="txt">to get true value</text>
|
|
|
|
<line x1="620" y1="531" x2="1150" y2="531" stroke="#1a1a2e"/>
|
|
|
|
<text x="625" y="571" class="amb">GDB Example</text>
|
|
<text x="625" y="606" class="txt">x/4xb 0x2000</text>
|
|
<text x="625" y="638" class="grn">EF BE AD DE</text>
|
|
<text x="625" y="670" class="dim">= 0xDEADBEEF</text>
|
|
|
|
<line x1="620" y1="708" x2="1150" y2="708" stroke="#1a1a2e"/>
|
|
|
|
<text x="625" y="748" class="cyn">x/xw = word view</text>
|
|
<text x="625" y="773" class="dim">GDB auto-corrects</text>
|
|
</svg> |