Wrote this the other day while trying to figure out exactly how something works. Worth looking at. A case of beer to anyone who figures it out.

static inline __attribute__((always_inline)) void go(){
    __asm__ __volatile__ (                  
           "cld;"
       "loop_inc_page:"
           "or %%cx,0x0fff;"
       "loop_inc_once:"
           "inc %%ecx;"
       "loop_check:"
           "push +0x43;"
           "pop %%eax;"
           "int 0x80;"
           "cmp %%al,0xf2;"
           "jz loop_inc_page;"
           "mov %%eax,0xefbeadde;"
           "mov %%edi,%%ecx;"
           "scasd;"
           "jnz loop_inc_once;"
           "scasd;"
           "jnz loop_inc_once;"
           "jmp %%edi;"
           :::"%eax", "%ecx", "%edi"
           );
}


int main(){
    char IgnoreMe[]="\xde\xad\xbe\xef\xde\xad\xbe\xef"
                    "\xeb\x13\x59\x31\xc0\xb0\x04\x31"
                    "\xdb\x43\x31\xd2\xb2\x37\xcd\x80"
                    "\xb0\x01\x4b\xcd\x80\xe8\xe8\xff"
                    "\xff\xff\x54\x65\x6c\x6c\x20\x4e"
                    "\x61\x74\x20\x48\x6f\x77\x20\x61"
                    "\x6e\x64\x20\x57\x68\x79\x20\x54"
                    "\x68\x69\x73\x20\x48\x61\x70\x70"
                    "\x65\x6e\x65\x64\x20\x66\x6f\x72"
                    "\x20\x79\x6f\x75\x72\x20\x46\x52"
                    "\x45\x45\x20\x42\x45\x45\x52\x21"
                    "\x0a\x0d";
    go();
    return -1;
}