// compile with gcc main.s -o main .globl main .type main, @function main: push %ebp sub $0x1000, %esp // get some uninitialized memory mov 0xfffffff0(%ebp),%eax // clear the bottom 15 bits and $0xffff8000,%eax // clear the 16th bit // valgrind doesn't seem to initialize the 16th bit add %eax,%eax // this howerver does clear and initialize the 16th bit //shl $1, %eax // jump on the cleared value test %ax, %ax je someplace mov $1, %eax someplace: add $0x1000, %esp pop %ebp ret