I'm just getting into the book and I've hit a snag when attempting to assemble and link the power function example, originally I was getting "Error: illegal suffix", I can't get access to the full error currently.
I'm using x86-64, with some googling I was able to find popq, and pushq with registers having a prefix of r instead of e. When changing code to use q suffixes instead of l suffixes I can get the code to assemble and link, but it seems to loop continuously, eventually giving a segmentation fault. I tried assembling and linking with as --32 power.s -o power.o ld -melf_i386 power.o -o power And the code exactly as the book has it and it assembled and linked fine, but again, infinite loop to eventual segmentation fault. I'd rather not have to assemble and link for 32 bit and I would like to learn the correct instructions for x86-64. Any help on where I can find equivalents of the instruction set the book uses? I'm very new to assembly so bear with me if ive left out some important information, I do have 7-8 months java experience so I'm not entirely a beginner, but far from advanced at programming. _______________________________________________ Pgubook-readers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/pgubook-readers
