pouët.net

Random line of code thread

category: code [glöplog]
Code:lea DOSName+(NewClose-NewOpen)(pc),a1
added on the 2020-08-19 23:01:40 by StingRay StingRay
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(
added on the 2020-08-22 15:41:59 by anix anix
Code:mov eax, [GmDls + GMDLS_OFFSETS + eax*4]
added on the 2020-08-23 21:17:01 by Blueberry Blueberry
Code:let quiet_nan = Value::from_comps(false, format.exp_max(), sig_quiet_bit, format.clone());
added on the 2020-08-24 10:46:32 by ferris ferris
Code:ret ; nope, fuck this shit
added on the 2020-08-25 06:21:28 by DevEd DevEd
Code:mul tmp2, isize, tmp1 @ threshold = (intervalsize * prob) >> 16, but we do not shift here but below using the barrel shifter
added on the 2020-08-27 10:56:00 by Moerder Moerder
Moerder: ARM assembly? :D

Code: jne short .no_ifunc ; ... db 0x3c .no_ifunc: xchg ecx, eax
(source)
added on the 2020-08-27 17:01:03 by porocyon porocyon
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
added on the 2020-08-27 19:19:56 by Moerder Moerder
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. :)
added on the 2020-08-29 15:28:13 by Blueberry Blueberry
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
added on the 2020-10-12 00:54:44 by fuwn fuwn
Code:movea DS_PointerTable,r7,r6
added on the 2020-10-12 05:11:14 by DevEd DevEd
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
added on the 2020-10-12 12:41:27 by sol_hsa sol_hsa
Code: if(!chan->device || !chan->device->dev || !chan->device->dev->driver || !chan->device->dev->driver->name) return false;
added on the 2020-11-05 00:46:42 by RufUsul RufUsul
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
added on the 2020-11-05 05:17:17 by porocyon porocyon
Code:hr = pDXGIFactory->EnumAdapterByGpuPreference(0, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, IID_PPV_ARGS(&pDXGIAdapter));
added on the 2020-11-05 14:29:52 by EvilOne EvilOne
Code:*codepointer++ = 0x3368; // "move.l offset(a0),offset(a1)"
added on the 2020-11-05 19:50:46 by urs urs
NOP
added on the 2020-11-06 22:19:06 by xstatique xstatique
Code:compile(Demo::new(), num_frames);
added on the 2020-11-11 00:58:02 by ferris ferris
Code:rand = sin(1.0 / (length(c) / 1e7));
added on the 2020-11-11 15:34:01 by prost prost
Code:section "lonely ret",rom0[$1e0] LonelyRet: ret

technically 3 lines but whatever
added on the 2020-11-18 04:43:32 by DevEd DevEd
float z_e = 2.0f * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));
added on the 2020-11-25 11:07:55 by DemoTron DemoTron
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
added on the 2020-11-26 01:39:26 by porocyon porocyon
H8. Mindestens?
added on the 2020-11-26 16:16:22 by Moerder Moerder

login