[root@A01-R06-I180-93 power]# as power.s -o power.o
power.s: Assembler messages:
power.s:12: Error: invalid instruction suffix for `push'git
.code32
to the top of your assembly code--32
flag-m elf_i386
flag
https://github.com/agam/LearningAssembly/blob/master/power.sgithub
運行腳本:code
#!/bin/sh
as --32 $1.s -o $1
ld -melf_i386 $1.o -o $1
./$1
echo $?it