标题: 高手帮我看看编译错误,我实在找不到是怎么回事!!
LLLL_12342000
新生入学
Rank: 1
注册用户



UID 138292
精华 0
积分 0(积分有什么用?)
帖子 22
阅读权限 10
注册 2005-10-17
状态 离线
发表于 2008-1-3 10:46  资料  个人空间  短消息  加为好友 
高手帮我看看编译错误,我实在找不到是怎么回事!!

源代码如下:
.lr6rBM#O               .file "max,s" Q+t M+}s
.section        .text
1r3d j3Ab8NIU        .type max,@function
X9XOS        }4FXb;e.globl maxLinux伊甸园论坛G/py{/}] p        d
max:
fs7`H@P;e

        pushl %ebp
o
|P T7C!_
L        YM
        movl %esp,%ebp
$S`5L9GB"TF0a.w*YK        subl $8,%esp J        ^4z2GH2s"p?^
        movl 8(%esp),%eax
$I:qn3?,cC`[        movl %eax,-4(%esp)
/J@ N o!A&?%`www.linuxeden.com        movl 12(%esp),%eax
:]TSl:JV+Iq`M        movl %eax,-8(%esp)MYQy!MWYy
}(E
o(E

        cmpl %eax,-4(%esp)Linux伊甸园论坛
pi#}
n-@5G

        cmovge movl -4(%esp),%eaxr~.f0N S0R+n
        leave
U
p9L6^Y7G4c
s8sv
        retLinux伊甸园论坛}7FPO7F!A_ X
        Linux伊甸园论坛-?        M|+m
m4v
tWm't

.section        .textLinux伊甸园论坛d.e u9a'xoe8N,Q
.globl _start
t&t%Wgu.`'q9N_start:www.linuxeden.com] s'Mf%R;}1H,c0^ I
        pushl $0x4www.linuxeden.comK+[|&Sx@8q
        pushl $0x8
r[s+n        `
x/^
        call max
mQ~6]0{8}t5iZ        addl $8,%esp? B+Rk5h6[!L
        movl %eax,%ebx
fP;o |4Xiwww.linuxeden.com        movl $1,%eax/?]VpW"w Y
        int $0x80www.linuxeden.com(u/Qn1e,L.T1V@E)@Sy
错误信息::Y/r
X3U I.jQ

as -o max,o max.s
Z#p BT'P7F'jmax.s: Assembler messages:
Z:tC
A8w'o5o(@5G+F
max.s:5: Error: suffix or operands invalid for `push'
3fU*e n~        j.NFLs'y&bs        }max.s:20: Error: suffix or operands invalid for `push'QCk h$U@Mt
max.s:21: Error: suffix or operands invalid for `push'
pE#~*BFi)c对push 的使用哪里错了啊?

顶部
不容错过的IBM 集群技术资源汇总
LLLL_12342000
新生入学
Rank: 1
注册用户



UID 138292
精华 0
积分 0(积分有什么用?)
帖子 22
阅读权限 10
注册 2005-10-17
状态 离线
发表于 2008-1-3 10:50  资料  个人空间  短消息  加为好友 
不好意思,我找到了。我使用的系统为X86_64
9E%^(zu h~ yD(Bh在编译的时候加上选项--32就可以了
lHSI^;ZFwww.linuxeden.comO'yQu5d
as --32 -o max.o max.s

顶部
dearvoid
版主
Rank: 7Rank: 7Rank: 7
Clark J. Wang



UID 26605
精华 26
积分 61(积分有什么用?)
帖子 4814
阅读权限 100
注册 2002-10-12
来自 Beijing, China
状态 离线
发表于 2008-1-3 19:43  资料  个人空间  短消息  加为好友 
good





'
◆ 发帖时请【突出主题】, 以便您的问题能够及时得到回复
◆ 发帖时请将您的【代码】或者【脚本】写在 [code] 和 [/code] 中间
顶部
 



当前时区 GMT+8, 现在时间是 2008-5-17 03:00

    Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
Processed in 0.085765 second(s), 5 queries

清除 Cookies - 联系我们 - Linux伊甸园 - Archiver - WAP