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

argv is bloat

Name: Anonymous 2011-11-26 21:11

this_is_fasta.c :


#include <stdio.h>
#include <stdlib.h>

void _start() {
  puts("I pity the fools that lag program start and ending by calling and returning from main");
  exit(0);
}



noTIMEfor@LOVE$ gcc -c this_is_fasta.c
noTIMEfor@LOVE$ ld -I/lib/ld-linux.so.2 -lc this_is_fasta.o -o this_is_fasta
noTIMEfor@LOVE$ this_is_fasta
I pity the fools that lag program start and ending by calling and returning from main
noTIMEfor@LOVE$

Name: puts is bloat 2011-11-26 22:03


char* str = "I pity the fools that lag program string printing by calling puts\n";
void _start() {
  asm("mov $86,%edx"); // string length
  asm("mov str,%ecx"); // string pointer
  asm("mov $1,%ebx"); // stdout file descriptor
  asm("mov $4,%eax"); // sys_write system call
  asm("int $0x80");

  asm("mov $1,%eax"); // sys_exit system call
  asm("mov $0,%ebx"); // exit status zero
  asm("int $0x80");
}

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