ahh damn, wanna see how dumb i am? i was writing this asm routine to print out a string to stdout. first the function would append a newline to the string tho. now its supposed to first get the string length, then move in a newline character(hex 0xa) into the last byte where the NULL would usually be. soo, for the last 30 friggin minutes my dumbass kept trying to figure out why my string length function was returning 0 when it was workin fine b4. turns out i was doing this:
movl $0xa, (%ecx, %eax, 1) ;//add a newline where NULL terminator would be
instead of
movb $0xa, (%ecx, %eax, 1) ;//add a newline where NULL terminator would be
so i was moving in 0x0a000000 and trashing the rest of my strings on the stack, instead of just moving in a single by 0x0a!!! uuh duhhhhhhhhhhhhhh!! *checks clock, 4:30 am!!!* fsck maybe this has something to do with it!!! lol