pouët.net

Random line of code thread

category: code [glöplog]
if(a)
added on the 2008-05-28 04:04:16 by xernobyl xernobyl
very original xernobyl
added on the 2008-05-28 08:14:11 by LiraNuna LiraNuna
CUDA on the C64? dec $d019,lda$d012
added on the 2008-05-28 20:52:13 by vscd vscd
$ ruby -e "puts ARGF.to_a.reverse" *
added on the 2008-05-29 01:52:17 by spindle spindle
__declspec( naked )
added on the 2008-05-29 03:03:43 by bdk bdk
What do you think about The Cartoon Fish 4k asm sources ?
Is there a way to see a full ASM 4ko on Windows Vista ?
random _line_ of code ... do you get it, do you?

let's move on straight from the real life
$n = $this->INVOICE_PREFIXES['advert'].'-'.str_pad(strval($n),4,'0',STR_PAD_LEFT);
added on the 2008-05-29 09:54:58 by d0DgE d0DgE
BULL:SHIT (THE UNIVERSE)
BUY:SOMESHIT
BUILD:AI SOLD
;;

qwertyuiop == asdfghjkl == zxcvbnm ;;

mov mov,nop
ax,bx=cx(ret)
ret nopz

ld bugo,cat
and one

carrero hose armantos xesera
zipo ouf polizei

..casa
..virtuso
..dee
added on the 2008-05-29 10:06:54 by Optimus Optimus
void ThingCollection::listRegionID( Rect r, std::vector<Thing*> *dumpList, int mask, LONGLONG opID ) { for( int i=0; i<(int)list.size(); i++ ) if( ( list[ i ]->flags & mask ) && ( list[ i ]->refID( opID ) ) && ( list[ i ]->bb.overlaps( r ) ) ) dumpList->push_back( list[ i ] ); if( isBranch ) { if( childUL->weight && r.overlaps( childUL->bb ) ) childUL->listRegionID( r, dumpList, mask, opID ); if( childUR->weight && r.overlaps( childUR->bb ) ) childUR->listRegionID( r, dumpList, mask, opID ); if( childLL->weight && r.overlaps( childLL->bb ) ) childLL->listRegionID( r, dumpList, mask, opID ); if( childLR->weight && r.overlaps( childLR->bb ) ) childLR->listRegionID( r, dumpList, mask, opID ); } }
added on the 2008-05-29 10:23:18 by doomdoom doomdoom
getpulsewidth:
lda #$80
sta pulsewidth+1
lda pulsemod
cmp #$01
bne nopulsemod
lda $d41b
sta pulsewidth+1
nopulsemod:
rol pulsewidth+1
rol pulsewidth
clc
rol pulsewidth+1
rol pulsewidth
clc
rol pulsewidth+1
rol pulsewidth
clc
rol pulsewidth+1
rol pulsewidth
clc

lda pulsewidth+1
sta $d402

lda pulsewidth
sta $d403
rts
added on the 2008-05-29 12:21:15 by linde linde
Will this thread compile? ;)
explicit HUGE CROWD GOURAUD MAPPING with ZBUFFER :

@@miniloop: cmp EBP,[EDI*4+11111111h]
ja @@noz
mov BL,DH
rol EDX,16
mov BH,DH
rol EDX,16
mov AX,SI
mov AL,[EBX]
mov AL,[EAX]
@@ecran: mov [EDI+11111111h],AL
@@zbuffer: mov [EDI*4+11111111h],EBP
@@noz: inc EDI
@@del0: add EDX,11111111h
@@dcl0: add SI,1111h
@@dsurz: add EBP,11111111h
dec CX
jnz @@miniloop
a little error due to quick coding from 10 years time...
NO gets a one more vertical blank wait too, due to party coding.
oops...only an error for NO...
(missviewing.)
linde: clc/rol? why not asl?
added on the 2008-05-29 16:10:46 by kb_ kb_
and why not

ldy #$80
lda pulsemod
beq nopulsemod
ldy $d41b
nopulsemod:
tya
asl
asl
asl
asl
sta $d402
tya
lsr
lsr
lsr
lsr
sta $d403

?

added on the 2008-05-29 16:13:35 by kb_ kb_
ah, i see! thanks for the pointers, i've just started playing with 6502. i totally overlooked asl. that last piece of code looks short and neat :)
added on the 2008-05-29 16:57:39 by linde linde
beq without a cmp always compares with 0, right?
added on the 2008-05-29 16:59:11 by linde linde
Always branches if the zero-flag is set, so... kinda..yes.. :)
if (NULL == this) {
exit(-1);
}
added on the 2008-05-29 18:10:29 by raer raer
Code:#include <stdio.h> int main(void){ char string[100]; printf("Overflow me: "); gets(string); return(0); }
added on the 2008-05-29 18:33:04 by pera pera
#include <stdio.h>

int main()
{
ten:
printf("The weekend is near!\n");
twenty:
goto ten;
return 0;
}
added on the 2008-05-30 16:37:55 by raer raer

login