2
<p>they&#39;re passing single bytes to functions! C widens integer parameters to a word, so on a 16bit system, they&#39;re passed in 16-bit registers.</p>
<p>yeah a compiler doesn&#39;t just start using CF to return bools instead of AX. This is assembly.</p>
<p>I bet broderbund bought this sound code. It feels completely different: This was either compiled on a different compiler or was written in assembly.</p>
<p>they read from the ports instead of measuring time, because that&#39;ll take a certain amount of time on x86. I&#39;m too tired to confirm if their timing logic is sound. It&#39;s possible they&#39;re just assuming the PC is slow enough that it&#39;ll wait long enough</p>
<p>They initialized the SoundBlaster DSP backwards.<br />You&#39;re supposed to send a 0 to the reset port, wait 3 microseconds, send a 1, then wait up to 100 microseconds for an 0xAA to show up on the data port.</p><p>They instead send a 1, then a 0, then immediately start trying to read the data port.</p>
<p><span class="h-card" translate="no"><a href="https://urusai.social/@thepi" class="u-url mention">@<span>thepi</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> eventually they conclude C++ is bad and should never be used, and then they become Rust programmers</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>whitequark</span></a></span> This might cause other problems, <em>but!</em> I think we could convince the C++ programmers that std::istream is Always Bad and Should Never Be Used. C++ programmers love thinking that things are Always Bad and Should Never Be Used.</p>
<p><span class="h-card" translate="no"><a href="https://chaos.social/@jacqueline" class="u-url mention">@<span>jacqueline</span></a></span> pulseview is so bad, it&#39;s unbearable</p><p>i should make glasgow into an actually good LA</p>
<p>time spent reversing std::istream: 45 minutes<br />time spent cracking encryption: 30 seconds<br />time spent filing a Binary Ninja issue for incorrect field resolution: 5 minutes</p><p>someone who is good at reverse engineering please help me balance this. my demangler is working overtime</p>