2
@whitequark@mastodon.social Yandere register.
<p><span class="h-card" translate="no"><a href="https://digipres.club/@foone" class="u-url mention">@<span>foone</span></a></span> that sounds extremely SjLj-like, yeah</p>
<p>gonna have to dig out the appropriate compiler and check if setjmp/longjmp compiles the same.</p><p>then cry</p>
<p>is this a setjmp/longjmp, maybe? that&#39;s the only way this could really be C</p>
<p>this is a SaveRegisters function, which also saves the cs:ip of the calling function. </p><p>but there&#39;s also a RestoreRegisters function, which ALSO restores the cs:ip of the calling function.<br />and then it returns. <br />to the restored cs:ip</p><p>THIS FUNCTION IS A DYNAMIC GOTO</p>
<p>arg, this function is saving and storing part of it&#39;s own return address. </p><p>It&#39;s a farcall (in 16bit mode), and it is looking at the stack to read the segment portion of the address, so it can save it away in a struct.</p>
<p><span class="h-card" translate="no"><a href="https://chaos.social/@gsuberland" class="u-url mention">@<span>gsuberland</span></a></span> whoa that&#39;s neat</p>
<p>Indonesia: PANGSIT<br />Philippines: PANCIT </p><p>The Philippines just &quot;hispanized&quot; the spelling of PANGSIT from Indonesia.</p>
<p>just realised you can do this in C#</p><p>const int MaxStackAlloc = 1024;<br />Span&lt;int&gt; indices = count &lt;= MaxStackAlloc ? stackalloc int[count] : new int[count];</p><p>so you dynamically get stack or heap allocation depending on the count.</p>