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



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

源代码如下:www.linuxeden.com4i%kDa0jN*q {;r
               .file "max,s"
[?0ucN*\'~n.section        .text}C-BZk:^6c0_4e
        .type max,@function
Vjs[_ BL        Dwww.linuxeden.com.globl max
5v
R
u5b B6h'w,HLinux伊甸园论坛
max:&l'^_2D?9eXM0f        u
        pushl %ebp
TG
r!c+r0xj
        movl %esp,%ebp
rI];u| Jb?K        subl $8,%esp
7d7K_#F
u;~
        movl 8(%esp),%eax\*K[}eD|5|[L
        movl %eax,-4(%esp)
        YO#Sn"~Linux伊甸园论坛        movl 12(%esp),%eax
eh@$Z
X.B~ X/Y |
SLinux伊甸园论坛
        movl %eax,-8(%esp)
'Xa&{5r!QLinux伊甸园论坛        cmpl %eax,-4(%esp)
+e Wu'vq        cmovge movl -4(%esp),%eax
dty        b+WNW owww.linuxeden.com        leave
Gf6v$?~9s        ret3]!qs$~0M0z v
       
        J-c1D
`\U-Iv0|Linux伊甸园论坛
.section        .text
J*TOE~/}B)}.globl _start
&w        mFm?PoLinux伊甸园论坛_start:
%Rw _b qwww.linuxeden.com        pushl $0x4
JF5I[@T        pushl $0x8HH \|iOW
        call max%q.u
r        _2A'\NI        D5i(D

        addl $8,%esp&GQYZ5^f$N3G1o%P3T
        movl %eax,%ebx
G/T&EY`www.linuxeden.com        movl $1,%eaxT$a'vh8J$s5] Y
        int $0x80www.linuxeden.com6\C1L@s'~9G6D
h`/G

错误信息:Linux伊甸园论坛3z9X;Bv_.s~"|
as -o max,o max.s
        ?9HI-x)L.amax.s: Assembler messages:0|3VU8^
UP5@zl&x?u

max.s:5: Error: suffix or operands invalid for `push'
H \7z#KiJmax.s:20: Error: suffix or operands invalid for `push'
f6Ap/U$]+D#?1@WY Qmax.s:21: Error: suffix or operands invalid for `push'b2op        TU
对push 的使用哪里错了啊?

顶部
LLLL_12342000
新生入学
Rank: 1
注册用户



UID 138292
精华 0
积分 0(积分有什么用?)
帖子 22
阅读权限 10
注册 2005-10-17
状态 离线
发表于 2008-1-3 10:50  资料  个人空间  短消息  加为好友 
不好意思,我找到了。我使用的系统为X86_64
8c&L}U8T2h        ZLinux伊甸园论坛在编译的时候加上选项--32就可以了www.linuxeden.com
~(Xu,leQ

_        aa6]*F6W
C-v2u

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-16 11:06

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

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