Mai :v_trans:<p>So im working again on <a href="https://codearq.net/chalk-os/rustboot" rel="nofollow noopener" target="_blank">rustboot</a> and now have the "problem" that the bootsector of it dosn't contain an BiosParameterBlock, which <strong>should</strong> be only needed for DOS but welp aparently there are BIOS'es out there that just <strong>write</strong> inside it, causing it to screw up the code inside it. -.-</p><p>It needs ~51 bytes or so, but my current implementation has only ~20 bytes of wiggleroom, mainly bc rust/llvm use 32bit-in-16bit code, which has the "problem" that an <code>mov</code> of an u16 immediate to a register occupies 6 instead of 3 bytes (2 zero bytes to pad u16 to u32 + the sizeprefix <code>0x66</code> to "temporarily" switch to 32bit).</p><p>Sooooooo yeah yk what I did. You tought of the sensible way of writing it simply entirely in assembly? Naaaaah; I'm gonna patch LLVM ofc!! :blobcat_coolio: Which works quite okayish currently; I got it to correctly emit 16bit <code>call</code> and <code>ret</code> instructions (another thing that was eating space even before and I had to do some very creative workarounds...); now I only need to <em>somehow</em> compile an own rust toolchain that uses the patched LLVM, but it dosn't get's it right and the extra cpu target (<code>i8086</code> instead of <code>i386</code>) dosn't get recognized as a valid target when rust tries to ask LLVM for it.... <em>sigh</em></p><p>Maybe I should rather work on the implementation of an realmode interrupt routine that's callable from 32bit so I can implement a basic disk interface.</p><p><a href="https://soc.saiyajin.space/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> <a href="https://soc.saiyajin.space/tags/osdev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>osdev</span></a> <a href="https://soc.saiyajin.space/tags/bootloader" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bootloader</span></a> <a href="https://soc.saiyajin.space/tags/rustboot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustboot</span></a> <a href="https://soc.saiyajin.space/tags/development" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>development</span></a> <a href="https://soc.saiyajin.space/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://soc.saiyajin.space/tags/software" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>software</span></a> <a href="https://soc.saiyajin.space/tags/floss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>floss</span></a> <a href="https://soc.saiyajin.space/tags/oss" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>oss</span></a> <a href="https://soc.saiyajin.space/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a></p>