Random line of code thread
category: code [glöplog]
Code:
eor.b #2,$ffff820a.w
Code:
add.w #20*screenWidth+4,a0
Code:
var %y1 $calc(%y + ($cos($hget(demor, end_sprite_sin_ [ $+ [ %count ] ])).deg * 100))
Code:
move.w #[64*38]+[256/16],$58(a6)
Code:
# a letter, demo coding style
@jcl: I'd have made it an extension method of Expression<Func<TElement, TValue>> if I was in you...
Code:
<erl>
out(A) -> {bindings, [{"A", "foo"}, {"B", "baz"}]}.
</erl>
<html>
<body>
<p>%%A%%</p>
<p><font size="4">%%A%% != %%B%%</font></p>
<p>An enormous amount of plain html source here.</p>
<erl>
out(A) ->
Value = yaws_api:binding("A"),
{ehtml, {ul, [],
[{li, [],
Value},
{li, [],
"gazonk"}]}}.
</erl>
%%A%% = %%A%% (hit me)
</body>
</html>
Code:
wglMakeCurrent(dc, rc);
Code:
__asm("\t asr.l #8,d4 ; dv * 256");
Code:
sleep 10
Code:
move.l #$320ffffe,(a0)+
hArDy./tRSi_20 : yes, IDL.. impressive!
firefox javascript fail:
return window.btoa('ひらがな');
"String contains an invalid character code: 5"
return window.btoa('ひらがな');
"String contains an invalid character code: 5"
Outline made me write a sprite code generator...
After it was written (argh!) i found a very interesting article by MCoder (lots of code around too):
http://euler.free.fr/AtariST/unreleased/sprites/ARTICLE3.TXT
Code:
ANDI.L #$FFE0FFE0,$1E0(A6)
MOVE.L #$FE00FE00,D0
AND.L D0,$820(A6)
AND.L D0,$780(A6)
MOVE.L #$FC00FC00,D0
AND.L D0,$AA0(A6)
AND.L D0,$8C0(A6)
MOVE.L #$F800F800,D0
AND.L D0,$A00(A6)
AND.L D0,$960(A6)
ANDI.L #$C7C0C7C0,$280(A6)
ANDI.L #$BFC0BFC0,$5A0(A6)
ANDI.L #$BB80BB80,$320(A6)
ANDI.L #$7D807D80,$3C0(A6)
ANDI.L #$73807380,$500(A6)
ANDI.L #$6D806D80,$460(A6)
ANDI.L #$FFF0FFF,$AA8(A6)
MOVE.L #$7FF07FF,D0
AND.L D0,$A08(A6)
AND.L D0,$968(A6)
MOVE.L #$3FF03FF,D0
AND.L D0,$788(A6)
AND.L D0,$1E8(A6)
MOVE.L #$1FF01FF,D0
AND.L D0,$288(A6)
AND.L D0,$6E8(A6)
AND.L D0,$3C8(A6)
AND.L D0,$328(A6)
MOVE.L #$FF00FF,D0
AND.L D0,$648(A6)
AND.L D0,$468(A6)
MOVE.L #$7F007F,D0
AND.L D0,$5A8(A6)
AND.L D0,$508(A6)
ANDI.W #$FFF0,$142(A6)
ANDI.W #$FFEF,2(A6)
ANDI.W #$FFC8,$A2(A6)
ANDI.W #$FE08,$B42(A6)
ANDI.W #$F000,$6E2(A6)
ANDI.W #$CF80,$642(A6)
ANDI.W #$1FFF,$B4A(A6)
MOVE.W #$FFF,D0
AND.W D0,$AA(A6)
AND.W D0,$8CA(A6)
ANDI.W #$7FF,$82A(A6)
ANDI.W #$3FF,$14A(A6)
ORI.L #$FC00F000,$148(A6)
ORI.L #$F0006000,$8C8(A6)
ORI.L #$CE003000,$6E8(A6)
ORI.L #$B100CE00,$648(A6)
ORI.L #$925E002F,$460(A6)
ORI.L #$90006000,$AA8(A6)
ORI.L #$8C5E002D,$500(A6)
ORI.L #$825C003F,$3C0(A6)
MOVE.L #$4A00B400,D0
OR.L D0,$3C8(A6)
OR.L D0,$328(A6)
MOVE.L #$4800B000,D0
OR.L D0,$A08(A6)
OR.L D0,$968(A6)
ORI.L #$444C0037,$320(A6)
ORI.L #$402F001B,$5A0(A6)
ORI.L #$383C000F,$280(A6)
ORI.L #$3400F800,$1E8(A6)
ORI.L #$307F002B,$640(A6)
ORI.L #$FFF0070,$6E0(A6)
ORI.L #$464039B,$960(A6)
ORI.L #$41803E7,$A00(A6)
ORI.L #$400F800,$788(A6)
ORI.L #$3C7007B,$8C0(A6)
ORI.L #$21801E7,$AA0(A6)
ORI.L #$200FC00,$288(A6)
ORI.L #$1EE00FD,$780(A6)
ORI.L #$1CF00F6,$820(A6)
ORI.L #$100FE00,$468(A6)
MOVE.L #$80FF00,D0
OR.L D0,$508(A6)
OR.L D0,$5A8(A6)
ORI.L #$1E000F,$1E0(A6)
ORI.L #$F0007,$140(A6)
ORI.W #$F800,$828(A6)
ORI.W #$F000,$A8(A6)
ORI.W #$E000,$B48(A6)
ORI.W #$1F7,$B40(A6)
ORI.W #$37,$A0(A6)
ORI.W #$10,(A6)
JMP (A5)
After it was written (argh!) i found a very interesting article by MCoder (lots of code around too):
http://euler.free.fr/AtariST/unreleased/sprites/ARTICLE3.TXT
#endif
}
#if 0
}
#if 0
reviving thread
Code:
REM Derp.bat
%0 | %0
Prologue to good-times.
mov ax,0013
int 10
mov cx,a000
push cx
pop ds
mov ax,0013
int 10
mov cx,a000
push cx
pop ds
bool bOwThisHurts = gfd && !gfd->isPositive;
STA $FF15
[[NSNotificationCenter defaultCenter] postNotificationName: @"timeIsUp" object:self];
Code:
aspect = GetSystemMetrics(SM_CXSCREEN) / GetSystemMetrics(SM_CYSCREEN);
d3dpp.BackBufferHeight = d3dpp.BackBufferWidth / aspect;
mat_screen._22 = aspect / p1d77;
Do I really need that?
zbuffer[y][x] = zbig[y * 2][x * 2] + zbig[(y + 1) * 2][x * 2] + zbig[y * 2][(x + 1) * 2] + zbig[(y + 1) * 2][(x + 1) * 2];
Code:
const __m128 nX12X34Y12Y34 = _mm_hadd_ps(normalXXXX, normalYYYY); // | X1+X2 | X3+X4 | Y1+Y2 | Y3+Y4 |
const __m128 nXYZ12Z34 = _mm_hadd_ps(nX12X34Y12Y34, normalZZZZ); // | X | Y | Z1+Z2 | Z3+Z4 |
const __m128 nXYZZ = _mm_shuffle_ps(nXYZ12Z34, _mm_hadd_ps(nXYZ12Z34, nXYZ12Z34), _MM_SHUFFLE(1, 1, 1, 0));
Code:
;Chunky to planar
;a0=@vram+198*160=PIXELS IN LINEAR MODE (1 byte=1pix)
;a1=@vram+197*160
moveq.l #20-1,d6
ChunkyToPlanarWord
moveq.l #16-1,d5
ChunkyToPlanarPixel
add.l d3,d3
move.b (a0)+,d4
beq.s ChunkyToPlanarPixelClear
addq.l #1,d3
ChunkyToPlanarPixelClear
dbra d5,ChunkyToPlanarPixel
move.w d3,(a1)+
addq.l #6,a1
dbra d6,ChunkyToPlanarWord
Well, for a b&w bootsector...
My all time favourite:
Quote:
loop: lda $d40b;sta $d01a;jmp loop