pouët.net

Random line of code thread

category: code [glöplog]
Code: template <typename Callee, typename F, typename Tuple, size_t... Is> static auto CallMemb(Callee callee, F f, Tuple& t, std::index_sequence<Is...>) -> decltype((callee->*f)(std::get<Is>(t).ref()...)) { return (callee->*f)(std::get<Is>(t).ref()...); }
added on the 2018-03-21 14:00:01 by bartman bartman
Code: move.w #($60<<8)+$35c-$340-2,$340(a5) ; skip cartridge check
added on the 2018-03-22 09:02:44 by StingRay StingRay
Code:move.w #PATCHLOC+(AckCOP-Patches)-$31a-2,$31a+2(a5)
added on the 2018-03-22 09:17:27 by StingRay StingRay
Code:if(b_metahost) // Running as a VST plugin in another DAW ?
added on the 2018-03-24 17:32:36 by bsp bsp
Code:shr ah,cl
Code:move.l #1,$84(a6)
added on the 2018-04-09 13:38:16 by StingRay StingRay
Code:.found jsr (a2,d2.w) ; call decryption routine
added on the 2018-04-18 22:45:47 by StingRay StingRay
Code: if DIRTY_DOSLIB_HACK=1 move.l 4.w,a6 ; exec move.l (a6),a6 ; expans move.l (a6),a6 ; gfx move.l (a6),a6 ; layers move.l (a6),a6 ; intu move.l (a6),a6 ; mathffp if KICK_VERSION=13 move.l (a6),a6 ; romboot (1.3 only) endif move.l (a6),a6 ; dos


I ought to feel dirty and I do. [insert whining about Amiga's huge executable overhead]
added on the 2018-04-23 17:15:42 by losso losso
Code: const char* kRotatorImporterTestData = "2.417"; // Refraction index of... ?
added on the 2018-04-23 20:47:46 by superplek superplek
best code is no code (or smaller code)

Code: ;not exiting ;movem.l d2-d7/a4-a6,-(a7) ;lea CHIP_DEST,a3 move.l a3,d6 ; a3 = entry point -4 add.l d6,a3 ; unused chip area in all tested configurations (our hunk is chip) ; d0 and d4 already contain 1.L (args size) when started without arguments ; ;moveq.l #1,d3 ; use d0 instead ;moveq.l #1,d4 ror.l #1,d4 ; d3 contains 0000xxxx in all configurations ; ;move.l #NUM_CONTEXTS,d6 ; use d3 instead move.w #NUM_CONTEXTS,d3
added on the 2018-04-26 18:54:03 by losso losso
(our hunk is chip) != (our chunk is hip)
Quote:
Code: if DIRTY_DOSLIB_HACK=1 move.l 4.w,a6 ; exec move.l (a6),a6 ; expans move.l (a6),a6 ; gfx move.l (a6),a6 ; layers move.l (a6),a6 ; intu move.l (a6),a6 ; mathffp if KICK_VERSION=13 move.l (a6),a6 ; romboot (1.3 only) endif move.l (a6),a6 ; dos


I ought to feel dirty and I do. [insert whining about Amiga's huge executable overhead]

How about
Code: lea 4.w,a6 .finddos: move.l (a6),a6 move.l 10(a6),a0 cmp.w #'do',(a0) bne.b .finddos

Same size as the smaller version of your code (unless compressed) and not kickstart specific. :)
added on the 2018-04-27 00:35:40 by Blueberry Blueberry
Quote:
[insert whining about Amiga's huge executable overhead]

*cough* Windows *cough*
added on the 2018-04-27 00:41:50 by Blueberry Blueberry
Ah yes, forgot the random line of code...
Code: pextrb [ebp-1], xmm0, 7
added on the 2018-04-27 00:49:28 by Blueberry Blueberry
@Blueberry: Awesome!! I already kicked out the skip-n-libraries approach, might as well call into ROM directly... Your version still saves me 9 bytes over the proper openlib call (after compression). I'll take it, thanks! :)
added on the 2018-04-27 01:07:30 by losso losso
Code: aes_master_key: incbin "AES_MASTER_KEY.bin" aes_master_key_end:
added on the 2018-04-27 01:43:46 by lsl lsl
Code:clr.w -(sp) trap #1
added on the 2018-04-27 15:17:27 by gloky gloky
Code:LTF_343 BGF_605 OWE_320 LMN_506 RLE_599 TOE_503 ONH_912
added on the 2018-04-27 18:22:32 by Flashy Flashy
Code:g_textures->bindTextureToImage("computetest", 0, GL_WRITE_ONLY);
added on the 2018-04-27 23:36:34 by Preacher Preacher
Code:; skip fake/crap code
added on the 2018-04-28 00:33:35 by StingRay StingRay
poke(24364,7)
s=0
c=1
cls()
::q::
s+=.5
c+=.15
for a=0,64,.1 do
circ(s+a*cos(s/a),s+a*sin(s/a),1,c)
end
flip()
goto q
added on the 2018-04-29 00:17:01 by Lord_Am Lord_Am
Code:#[cfg(windows)] unsafe { timeBeginPeriod(1) };
added on the 2018-04-30 13:19:06 by Blueberry Blueberry
Code: public IReadOnlyList<OtaMeasurementPoint> SortPointSequence(IEnumerable<OtaMeasurementPoint> points) { return points.ScanBy(p => p.Allocation.MeasuredAllocation, ChannelAllocationComparer.Instance) .ThenBy(p => p.Position.Oversampling) .ThenBy(p => p.Position.Azimuth) .ThenBy(p => p.Position.Polarization.PolarNumber) .ThenBy(p => p.Position.Probe.ProbeNumber) .Scan(); }
added on the 2018-04-30 16:11:14 by Orace Orace
Code:fn rgb(r: u8, g: u8, b: u8) -> u32 { let r = r as u32; let g = g as u32; let b = b as u32; r << 16 | g << 8 | b }
added on the 2018-05-01 19:54:26 by FreeFull FreeFull

login