pouët.net

Go to bottom

Random line of code thread

category: code [glöplog]
Ah, it was LINE of code...

This one is for MSX tR... Change CPU between Z80 <-> R800...

Code:8728 DEFUSR=39+PEEK(-2385)+PEEK(-2384)*256:IFUSR(0)THENLINE>1COPY0&H80F6OR384ALLYOURBASEAREBELONGTOUS!


CPU mode after "LINE>" like this:

0 = Z80 (BIOS in ROM)
1 = R800 (BIOS in ROM)
2 = R800 (BIOS in RAM)

... works in BASIC... if you type SAVE"CPU.COM" it works also in MSX-DOS.
added on the 2008-10-03 01:28:42 by NYYRIKKI NYYRIKKI
*DOH*

A LL ---> ALL

(C) NYYRIKKI
added on the 2008-10-03 01:45:09 by NYYRIKKI NYYRIKKI
Code:HHOOK hook = SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, hInstance, GetCurrentThreadId());


Useful for.. all kinds of things..
added on the 2008-10-03 01:54:45 by ravity ravity
Check this code! It does 3 times the same thing. Isn't that stupid?

m_dLineWidth += 2;
if (m_dLineWidth < 4)
m_dLineWidth = 4;
if (m_dLineWidth > 64)
m_dLineWidth = 64;

if (m_dLineWidth < m_nMinThreadWidth)
m_dLineWidth = (float)m_nMinThreadWidth;

if (m_dLineWidth > m_nMaxThreadWidth)
m_dLineWidth = (float)m_nMaxThreadWidth;

if (m_dLineWidth < 1.0)
m_dLineWidth = 1.0;

if (m_dLineWidth > 1000)
m_dLineWidth = 1000;

added on the 2008-10-03 09:32:21 by Optimus Optimus
movem.l blackness,d0-d7
movem.l d0-d7,$8240.w
added on the 2008-10-03 10:17:14 by evil evil
Μιά αίσθηση καθυστέρησης διαπερνάει τον τοίχο. Το δωμάτιο μου μοιάζει με πάπια από το 3DS. Τα σχήματα στο γραφείο μου θυμίζουν φαινόμενα χωροχρονικής διαστρέβλωσης. Το μότιβο είναι σε αναμονή. Κάποτε τα φώτα θα πετάξουν σαν UFO. Χίλιες χιλιάδες καρφίτσες. Ο stone sober είναι εδώ. Dude.
added on the 2008-10-03 13:22:17 by Optimus Optimus
p.z -= normalize(p).z*(1.0-bheight)/-e.y*200.0; // hattuvakio
added on the 2008-10-03 13:25:59 by pommak pommak
u==3
added on the 2008-10-03 15:43:32 by leGend leGend
ARexx(Amiga):

shell:> rx "do forever;a=writech(stdout,':)'||x2c(d));b=delay(50);do c=1 to 5;a=writech(stdout,':p'||x2c(d));b=delay(10);a=writech(stdout,':P'||x2c(d));b=delay(10);end;end
added on the 2008-10-03 17:27:47 by megacz megacz
Code:demo or die;

Legal in perl (and probably others)
added on the 2008-10-06 19:47:24 by Joghurt Joghurt
php too
added on the 2008-10-06 20:34:34 by stijn stijn
ID3D10EffectMatrixVariable *mvpVar = g_pEffect->GetVariableByName( "mvp" )->AsMatrix();
mvpVar->SetMatrix( (float*)&mvp );
added on the 2008-10-06 20:37:16 by kusma kusma
char* f = (char*)(void*)Marshal::StringToHGlobalAnsi(b->textBox1->Text);




:(
filter (<3) women -- legal code
added on the 2008-10-07 13:57:15 by blala blala
++++++++++[>++++++++>+++++++<<-]>.-.++++++.>-.<-.
added on the 2008-11-02 11:19:58 by maw maw
do{drink();}while(!bottle.empty());
added on the 2008-11-03 11:28:59 by xTr1m xTr1m
maw: optimize a little

-[--->+<]>-----.-.>>-[---<+>]<.<----------.>-.
added on the 2008-11-03 11:48:52 by avoozl avoozl
public class ostern {

public static void main (String[]args)
{



java.util.Scanner input = new java.util.Scanner(System.in);
System.out.print("Bitte geben sie eine Jahreszahl ein: ");
int J = input.nextInt();
int m=0, n=0;
int Ostersonntag;

if (J<1583 || J>2299) System.out.println ("Kein gültiges Jahr");
else
{
if (J>=1583 && J<=1699) {
m=22;
n=2;
}
else if (J>=1700 && J<=1799)
{
m=23;
n=3;
}
else if (J>=1800 && J<=1899) {
m=23;
n=4;
}
else if (J>=1900 && J<=2099) {
m=24;
n=5;
}
else if (J>=2100 && J<=2199) {
m=24;
n=6;
}
else if (J>=2200 && J<=2299) {
m=25;
n=0;
}

int a = J%19; // Berechnung
int b = J%4;
int c = J%7;
int d = (19 * a+m)%30;
int e = (2 * b + 4 * c + 6 * d + n)%7;




if (d+e-9 == 26)
{
System.out.println ("Der Ostersonntag ist am 19. April");
}

else if (d+e-9 == 25 && d == 28 && e == 6 && a>10)
{
System.out.println ("Der Ostersonntag ist am 18. April");
}

else if (d+e<=9)
{
Ostersonntag = 22+d+e;
System.out.println ("Der Ostersonntag ist am " + Ostersonntag +". März");
}

else if (d+e>=9)
{
Ostersonntag = d + e - 9;
System.out.println ("Der Ostersonntag ist am " +Ostersonntag +". April");
}
}
}
}

my homework... --> we had to calculate the sunday of the easterweekend for a couple of years ... and yes it's java...
added on the 2008-11-04 13:08:45 by Cat Cat
while(1)
Cat: you have to replace "ostersonntag" by "Breakpoint Demo compo" :P
$ff,$fc

good old vcs jump vector.

added on the 2008-11-04 13:28:04 by visy visy
@saga musix : I already thought about it... it think i will change it after i handed the programm in...
added on the 2008-11-04 13:32:03 by Cat Cat
Code: #include <iostream> #include <string> #include <fstream> using namespace std; int main(){ ifstream infile("file.txt"); string buffer[999]; int lines; //read all lines into array while(! infile.eof()){ getline(infile, buffer[lines]); lines++; } for(int i = 0; i < lines; i++){ cout<< buffer[i] << "\n"; } //error check, no duplicates for(int i = 0; i < lines; i++){ for(int ii = 0; ii < lines; ii++){ if(buffer[i] == buffer[ii] && i != ii){ cout << "ERROR: duplicated numbers found for " << buffer[i] << " and " << buffer[ii] << "\n"; } } } }
added on the 2008-11-10 21:13:21 by b0ib0t b0ib0t
:S
:D
added on the 2008-11-10 21:51:33 by b0ib0t b0ib0t

login

Go to top