用nasm编译出现如下问题:
[root@redhat8 Source]# nasm ./algo_a.nasm -o algo_a.o
./algo_a.nasm:180: error: impossible combination of address sizes
./algo_a.nasm:181: error: impossible combination of address sizes
./algo_a.nasm:182: error: impossible combination of address sizes
./algo_a.nasm:182: error: invalid 16-bit effective address
./algo_a.nasm:184: error: impossible combination of address sizes
./algo_a.nasm:184: error: invalid 16-bit effective address
./algo_a.nasm:186: error: impossible combination of address sizes
./algo_a.nasm:187: error: impossible combination of address sizes
./algo_a.nasm:201: error: impossible combination of address sizes
./algo_a.nasm:225: error: impossible combination of address sizes
./algo_a.nasm:226: error: impossible combination of address sizes
./algo_a.nasm:227: error: impossible combination of address sizes
./algo_a.nasm:227: error: invalid 16-bit effective address
./algo_a.nasm:229: error: impossible combination of address sizes
./algo_a.nasm:229: error: invalid 16-bit effective address
./algo_a.nasm:230: error: impossible combination of address sizes
./algo_a.nasm:231: error: impossible combination of address sizes
此时,要加一个编译选项-felf64,就好了,也就是用如下命令编译
nasm -felf64 ./algo_a.nasm -o algo_a.o