Random line of code thread
category: code [glöplog]
Code:
lea DOSName+(NewClose-NewOpen)(pc),a1
from fizzer's archive:
Code:
return max(max(min(min(min(smin(max(min(min(max(min(min(min(min(max(min(min(max(max(min(
Code:
mov eax, [GmDls + GMDLS_OFFSETS + eax*4]
Code:
let quiet_nan = Value::from_comps(false, format.exp_max(), sig_quiet_bit, format.clone());
Code:
ret ; nope, fuck this shit
Code:
mul tmp2, isize, tmp1 @ threshold = (intervalsize * prob) >> 16, but we do not shift here but below using the barrel shifter
Yes. I'm porting a certain depacker to ARM. Should have gone for Thumb directly, but writing ARM code is so much more satisfying :P
Quote:
Code:mul tmp2, isize, tmp1 @ threshold = (intervalsize * prob) >> 16, but we do not shift here but below using the barrel shifter
Binary range decoding... Curious to know which depacker you are porting. :)
Code:
<canvas id=R style=width:99%;background:navy><script>setInterval("s=Math.sin;q=Math.sqrt;d=(N,M,O,a)=>1/q((N-x+50-a/2)**2+(M-y+50-a%2)**2+(O-z+o)**2);f=a=>d(i,j,k,a)+d(j,-i,i,a)+d(k,i,-j,a)-.1-A;O=R.getContext('2d');i=s(n/2)*o;j=s(n+=.1)*o;k=s(n/3)*o;for(y=h;y--;)for(x=h;x--;){B=m=z=-o;for(r=9;m++;z+=r)A=0,A=f(0),A*B<0&&(r/=-2),B=A;z++;Z=f(0);z--;C=f(2)/Z;D=f(1)/Z;O.fillStyle='rgb('+s(n)*o/q(C*C+D*D)+',0,'+(C*h+n^D*h+n)+')';O.fillRect(x+h,y+o,1,1)}",n=o=25,h=99)</script>
A 512B intro in JavaScript with some raymarching (475B final version).
Code:
for ( ; ;) { // like while true but while gay
Code:
movea DS_PointerTable,r7,r6
Code:
const uint8 note = musicData.ReadUint8();
if(note & 0x80)
{
chnState.repeat = note & 0x7F;
repeatsLeft += chnState.repeat;
*m = chnState.prevCommand;
continue;
}
From textfx:
Code:
int a,b,c,d,e,f,g,h,i,j,k,l; // So sue me
Code:
if(!chan->device || !chan->device->dev || !chan->device->dev->driver || !chan->device->dev->driver->name)
return false;
Code:
.irp jjj, 0, 1, 2, 3, 4, 5, 6, [..........]
@ ...
@ better than the above variant
add r3, #1
mov r7, r12
teq r3, #0 @ check if add r3, #1 carries w/o touching the C flag
strcs r3, [r12, #(12+4*\jjj)] @ mm_t[j+2]
beq montmul_add_nocheat_\jjj @ next iters
montmul_add_nocheat_return_\jjj : @ need a return label because we can't call because lr is used already :D
Code:
hr = pDXGIFactory->EnumAdapterByGpuPreference(0, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, IID_PPV_ARGS(&pDXGIAdapter));
Code:
*codepointer++ = 0x3368; // "move.l offset(a0),offset(a1)"
NOP
Code:
compile(Demo::new(), num_frames);
Code:
rand = sin(1.0 / (length(c) / 1e7));
Code:
section "lonely ret",rom0[$1e0]
LonelyRet:
ret
technically 3 lines but whatever
float z_e = 2.0f * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));
Another round of "guess the instruction set" (>1 line to give you enough example stuff for guessing):
Code:
sub.w r0, r0
mov.w #0xbb74, e0
mov.w #0x2020, r1
jsr drawImageToScreen
mov.b #0x80, r3l
1: jsr smallDelay
jsr wdt_pet
dec.b r3l
bne 1b
sub.w r5, r5
1: mov.w #TX_PACKET_payload, r6
mov.b #0x80, r4l
eepmov.b
mov.w #0x3c80, r0
jsr sendPacket
H8. Mindestens?