Random line of code thread
category: code [glöplog]
nop
Code:
#define BeginProgram void main(int argc, char *argv[])
#define CloseBrace }
#define CommandLineArgument -1
#define Declare int i,j,n,Flag=1;
#define EndOfProgram return;
#define False 0;
#define ForLoop ;for
#define GetCommandLineArgument n=atoi(argv[1]);
#define i F1ag
#define If if
#define Increment ++
#define Is ==
#define LessThan *(c&64)*
#define LessThanOrEqualTo !=
#define Modulo %
#define OpenBrace {
#define PossibleFactor j
#define PossiblePrime i
#define Possib1ePrime (c=getchar())
#define PrimeNumber (c^(!i*n%64));
#define Print putchar
#define SetTo =
#define SmallestPrime 2
#define True 1
#define Variables char c;
#define Zero i%j
BeginProgram
OpenBrace
Declare Variables
GetCommandLineArgument
ForLoop (PossiblePrime SetTo SmallestPrime ;
Possib1ePrime LessThanOrEqualTo CommandLineArgument ;
Increment PossiblePrime)
OpenBrace
F1ag SetTo True
ForLoop (PossibleFactor SetTo SmallestPrime ;
PossibleFactor LessThan PossiblePrime ;
Increment PossibleFactor)
If (PossiblePrime Modulo PossibleFactor Is Zero)
F1ag SetTo False
If (Flag Is True)
Print PrimeNumber
CloseBrace
EndOfProgram
CloseBrace
*/
Code:
If Not Page.IsPostBack Then
Dim objConn As New SqlConnection(strConn)
objConn.Open()
Dim objCmd As New SqlCommand
objCmd.Connection = objConn
objCmd.CommandType = CommandType.StoredProcedure
objCmd.CommandText = "spGetAppUsers"
Dim objDR As SqlDataReader = objCmd.ExecuteReader
slcViewAs.Items.Clear()
While objDR.Read
Dim opt As New ListItem
opt.Text = objDR("UserGroupName")
opt.Value = objDR("UserGroupId")
slcViewAs.Items.Add(opt)
End While
objDR.Close()
objConn.Close()
End If
Synchron code is forever.. :)
Code:
move.w #$ 2100,sr
stop #$ 2100
move.w #$ 2700,sr
clr.b $fffffa19.w
lea $ffff8209.w,a6
moveq #127,d3
move.b #2,$ffff820a.w
.sync:
tst.b (a6)
beq.s .sync
move.b (a6),d2
sub.b d2,d3
lsr.l d3,d3
PDP-8 style in a loop:
Code:
PC=0;
ACC=0;
puts("cpuemu16 - Test");
while(running)
{
/* opcode fetch */
opcode=memory[PC] & 0xffff;
address=(opcode & 0x0FFF); /* extract address field*/
/* operand fetch */
indirect_mode=(opcode & INDIRECT_BIT);
if(indirect_mode>0)
{
indirect='I';
operand=memory[memory[address]];
wb_address=memory[address];
}
else
{
operand=memory[address];
wb_address=address;
indirect=' ';
}
/* debug */
printf("ACC=%4x PC=%3x %4x ",ACC,PC,opcode);
PC++;
/* execute */
switch(opcode & 0xE000)
{
case INSTRUCTION_OR: /* logic OR */
printf(" OR %c %3x",indirect,address);
ACC=ACC|operand;
break;
case INSTRUCTION_AND: /* logic AND */
printf("AND %c %3x",indirect,address);
ACC=ACC & operand;
break;
case INSTRUCTION_ADD: /* 2 complements ADD */
printf("ADD %c %3x",indirect,address);
ACC=ACC+operand;
break;
case INSTRUCTION_DSZ: /* decrement and skip if zero */
printf("DSZ %c %3x %d",indirect,address,memory[199]);
operand--;
memory[wb_address]=operand;
if(operand==0)
PC++; /* skip next if zero */
break;
case INSTRUCTION_SCA: /* store and clear ACC afterwards */
printf("SCA %c %3x",indirect,address);
memory[wb_address]=ACC;
ACC=0;
break;
case INSTRUCTION_JL: /* jump and link */
/* deposits current PC at the given address and sets PC to that location+1 */
printf(" JL %c %3x",indirect,address);
memory[wb_address]=PC; /* deposit old PC */
printf(" (backjump to %x)",memory[wb_address]);
PC=wb_address+1; /* set new PC */
break;
case INSTRUCTION_JMP: /* jump unconditionally */
printf("JMP %c %3x",indirect,address);
PC=address;
break;
case INSTRUCTION_MULTI: /* multipurpose instruction */
/* the multi instruction is encoded onehot into the lower byte
* each invalid opcode is treated as a NOP
*/
switch(opcode & 0x00ff)
{
case OPCODE_HALT:
printf("HALT\n");
/* memory dump on machine halt */
for(j=0;j<256;j++)
{
printf("%3x: ",j*16);
for(i=0;i<16;i++)
printf("%4x ",memory[j*16+i]);
putchar('\n');
}
running=FALSE;
break;
case OPCODE_CPLA:
printf("CPL A");
ACC=~ACC;
break;
case OPCODE_CLRA:
printf("CLR A");
ACC=0;
break;
case OPCODE_SHLA:
printf("SHL A");
ACC=ACC<<1;
break;
case OPCODE_SHRA:
printf("SHR A");
ACC=ACC>>1;
break;
case OPCODE_INCA:
printf("INC A");
ACC++;
break;
case OPCODE_SKPZ:
printf("SKPZ A");
if(ACC==0)
PC++;
break;
case OPCODE_SKNZ:
printf("SKNZ A");
if(ACC!=0)
PC++;
break;
default:
printf("NOP");
break;
}
break;
default:
/* this case should never ever be reached! */
puts("ILLEGAL OPCODE!");
}
}
PULU
Code:
if (foo) {
bar(false);
} else {
bar(true);
}
CLS
10 REM Scooter Strobo Power Intro
20 A=1
30 A=1-A
40 POKE53281,A (please insert your local backgroundcolor-registeraddress in here)
50 GOTO 30
RUN
Now let's wave the Hands to the Beat!
20 A=1
30 A=1-A
40 POKE53281,A (please insert your local backgroundcolor-registeraddress in here)
50 GOTO 30
RUN
Now let's wave the Hands to the Beat!
CLI
HLT
HLT
Code:
</Panel>
rep stosb ; I thought this thread was about only 1 line of code??
times, they are changing
UnderØATH had a CD called The Changing of Times :D...
... oh yeah and:
xor ax,ax
... oh yeah and:
xor ax,ax
Overscan is forever :)
Code:
moveq #0,d7
moveq #2,d6
;--------------
dcb.w 6,$4e71
move.b d6,$ffff8260.w
move.b d7,$ffff8260.w
dcb.w 90,$4e71
move.b d7,$ffff820a.w
move.b d6,$ffff820a.w
dcb.w 10,$4e71
move.b d6,$ffff8260.w
move.b d7,$ffff8260.w
dcb.w 4,$4e71
defer n! : n! ( n1 -- n2 ) dup 1 > if dup 1- n! * then ; ." 10! = " 10 n! . bye
Code:
echo (get_config("debug") && get_config("debug_prevent_redirect"))?"<p><a href=\"".$url."\">Redir « " . $url ."</a> (with".($postback?"":"out")." postback)".((get_config("debug_show_stacks", false))?"<p><pre>".debug_backtrace()."</pre></p>":""):"";
random line of coke
public function __construct($bDebug = false) {
$this->bDebug = $bDebug;
}
$this->bDebug = $bDebug;
}
dc.w $ffff,$fffe
iir :: Num b => Int -> (Stream a -> Stream b -> Stream b) -> Stream a -> Stream b
iir n f xs = ys where ys = f xs (delay n ys)
iir n f xs = ys where ys = f xs (delay n ys)
;42!=405006117752879898543142606244511569936384000000000
INPUT COPY PRINT "!=" ! PRINT END
#! COPY SKIP>0 !end COPY 1 - ! * END .!end DROP 1 END
INPUT COPY PRINT "!=" ! PRINT END
#! COPY SKIP>0 !end COPY 1 - ! * END .!end DROP 1 END
SELECT salary FROM employees WHERE salary>=100000;
0 lines found
0 lines found
Quote:
10 Print Hallo
20 Goto 10
run