Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

My first C program

Name: Anonymous 2014-05-17 2:44

#include <stdio.h>

void f() { printf("hello, world\n"); }

char prog[6];
typedef void (*callable)();

int main() {
prog[0] = 0xe8;
*(int *)(prog+1) = ((char *)f)-((char *)(prog+5));
prog[5] = 0xc3;
((callable)prog)();
}


I wrote this last night after finishing K&R. How is it?

Name: Anonymous 2014-05-17 4:03

>>20
The rich take advantage of the poor until the poor revolt and the rich find their heads under guillotines. A parasite that is eliminated by a collective action of their numerous hosts is not one fit for survival. Well adapted parasites are difficult to remove, like worms in the intestines of animals, or ticks on the hides of animals that don't have the dexterity to remove them.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List