Random line of code thread
category: code [glöplog]
Quote:
10 Print Was?
20 Goto 10
run
here, i wrote a blitz basic port:
Quote:
.a
Print "Was?"
Goto a
@stijntje
5 Print"Hallo"
10 Print "Was?"
20 Goto 5
run
Your Code doesn't run, quote the strings! ;)
5 Print"Hallo"
10 Print "Was?"
20 Goto 5
run
Your Code doesn't run, quote the strings! ;)
Years ago, when he was coding in BBC Basic (with some Arm assembly inside), and just to make fun of another friend who was a "pure" C addict my friend ArmOric started one program with:
10 GOTO 20
20 blabla...
:)
10 GOTO 20
20 blabla...
:)
well i start all my c functions that way.
Quote:
[15:54] helli: TQSuizidClient *emoKid;
h311o W0rLd! 7His n45tY 5OURCecode 1S Wri7Ten in L33T, a L4NgUaG3 By st3PheN (MAC) gr3aL WI7h aLec2 (moLe). 7His 1ANGuAge tak3S iN5PIrAtIOn Fr0m 7hE 7URInG compL3T3 LANguAgE 8raInFuCK, bY urb4N mu113r. A 1OT (of) P3opL3 C0dEd (fOR) 7hE L4t1ER LAngUaG3, 5O a 5IMPL3 iD34 w42 t0 CR341e a tRanSL4tOR be7Ween bRAINfuck (aND) l33T. Th1S w4S 3A2Y T0 Ach1Eve bY u5ING A s3arCH (And) R3P14Ce TO0l. 4f1eR COnvERSi0n On3 n33D 0nLY 7O wR1Te loAd5 0f 8ULlshiT aR0unD Th3 Pro6rAM' s V4LU3s. TH1s wA5 d0ne (ON) (An) Or161NAl By danI3L CrI5stoFaN1, c0MPuTInG 7he suCCESS1veS pOweR5 0F (tWo). wR17InG MeANINgfUlL T3xT 15 N0T 7HaT s1mple, E5pECiaLLY wheN 1rY1N6 t0 MinimiZ3 uS3l3sS W0RdS, 8etweeN pAREn7HeSIS (iN) thI5 1oUsY t3xT. 4fTerw4rD 0nE c4N C4pItaliZ3 1N wHAt3v3R WAY, 8ut N0t n3cEssarIlY (randOmLY), (tHe) remAiniN6 LETTeRs. i7 1s 5Ad t0 U53 sUcH m31hods (tO) Cre4Te 1e3t pROgR4Ms, 4nD rE4l PRo6RammerS WILl c3rtAiNLy DE5pISe it, bU7 ThAt 15 thE 14m3 metH0D (UsEd) 4 7hiS 0nE. (iT) i5 t1me 4 LEAVIn6, 1 (thinK)! Al4iN.
.count_set_bits ; in R0
MOV R3,#&33
ORR R3,R3,R3,LSL #8
ORR R3,R3,R3,LSL #16 ; 0x33333333
EOR R5,R3,R3,LSL #1 ; 0x55555555
AND R1,R5,R0,LSR #1
SUB R0,R0,R1 ; x = x - ((x >> 1) & 0x55555555);
AND R1,R3,R0,LSR #2 ; t = ((x >> 2) & 0x33333333);
AND R0,R0,R3
ADD R0,R0,R1 ; x = (x & 0x33333333) + t;
ADD R0,R0,R0,LSR #4
MOV R1,#&0F
ORR R1,R1,R1,LSL #8
ORR R1,R1,R1,LSL #16 ; 0x0F0F0F0F
AND R0,R0,R1 ; x = (x + (x >> 4)) & 0x0F0F0F0F;
ADD R0,R0,R0,LSL #8
ADD R0,R0,R0,LSL #16
MOV R0,R0,LSR #24 ; return x >> 24;
MOV R3,#&33
ORR R3,R3,R3,LSL #8
ORR R3,R3,R3,LSL #16 ; 0x33333333
EOR R5,R3,R3,LSL #1 ; 0x55555555
AND R1,R5,R0,LSR #1
SUB R0,R0,R1 ; x = x - ((x >> 1) & 0x55555555);
AND R1,R3,R0,LSR #2 ; t = ((x >> 2) & 0x33333333);
AND R0,R0,R3
ADD R0,R0,R1 ; x = (x & 0x33333333) + t;
ADD R0,R0,R0,LSR #4
MOV R1,#&0F
ORR R1,R1,R1,LSL #8
ORR R1,R1,R1,LSL #16 ; 0x0F0F0F0F
AND R0,R0,R1 ; x = (x + (x >> 4)) & 0x0F0F0F0F;
ADD R0,R0,R0,LSL #8
ADD R0,R0,R0,LSL #16
MOV R0,R0,LSR #24 ; return x >> 24;
.. / -.-. .- -. / .... .- ... / .- / -.-. .- .-. .-. --- - ..--..
char* why = "Why?"
void main() {
_asm {
mov eax, offset why
push eax
call printf
};
}
:--)
void main() {
_asm {
mov eax, offset why
push eax
call printf
};
}
:--)
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. C-ORD.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT CUSTOMER ASSIGN TO "i:\exemples\cobol\CUSTOMER.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS CUS-CODE.
SELECT ORDERS ASSIGN TO "i:\exemples\cobol\ORDERS.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS ORD-CODE
ALTERNATE RECORD KEY IS ORD-CUSTOMER
WITH DUPLICATES
ALTERNATE RECORD KEY IS ORD-DATE
WITH DUPLICATES.
SELECT STOCK ASSIGN TO "i:\exemples\cobol\STOCK.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS STK-CODE.
\o/ cobol
Sponge<Sponge<Sponge<bool>>> Bob ;
(while prototyping a static menger sponge)
(while prototyping a static menger sponge)
Some years ago I discovered the coolest way for german C coders to print out a percent sign:
Code:
printf("%c",'H'+'a'-'l'+'l'-'o'-' '+'W'-'e'+'l'-'t'+'!');
you're easily fascinated
Nice one, Mr. Hill.
:-)
:-)
// booze
move.w #$0200+(5<<12), $100
tas $b00b,y ;hardcore illegal 6502 opcode which is supposed to work like S=A&X {adr}=S&(H+1) except the &(H+1) drops off when the VIC does DMA on C64.
wouldn't it be more like:
char* was(char* hallo) {
if (!strcmp(hallo, "Hallo.")) return "Was?";
else return null;
}
int main() {
char* answer;
answer = was("Hallo.");
return 0;
}
char* was(char* hallo) {
if (!strcmp(hallo, "Hallo.")) return "Was?";
else return null;
}
int main() {
char* answer;
answer = was("Hallo.");
return 0;
}
ah yes, the code tag.
// check if the monitor applies to the given object
if ((monitor=block->monitors[i%MONITOR_BLOCK_SIZE])->object==object)
return monitor;
if ((monitor=block->monitors[i%MONITOR_BLOCK_SIZE])->object==object)
return monitor;
CALL -1184
Code:
!ifdef SATANIC {
bne +
ldx noteamt
+
dex
} else {
inx
cpx noteamt
bne +
ldx #0
+
}