| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1569 人关注过本帖
标题:新手求解下面小程序哪里出了问题
只看楼主 加入收藏
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
 问题点数:0 回复次数:21 
新手求解下面小程序哪里出了问题
.386
.model flat, stdcall
option casemap:none
include     windows.inc
include     user32.inc
include     kernel32.inc
include     masm32.inc
;*****************************************************
includelib     user32.lib
includelib     kernel32.lib
includelib     masm32.lib
;*****************************************************
;数据段
;*****************************************************
            .data
text    db    10,20,30,40
buffer    db    10  dup(0)
szFmt    db   '结果是:%d',0
;*****************************************************
;代码段
;*****************************************************
            .code
start:
    xor eax,eax
      mov al,text
    mov bl,text+1
    mov cl,text+2
    mov dl,text+3
    add    al,bl
    add    al,cl
    add    al,dl
      invoke     wsprintf,addr buffer,addr szFmt,eax
    invoke     ClearScreen
    invoke    locate,10,10
    invoke    StdOut,addr buffer
    invoke        StdIn,addr buffer,LENGTHOF buffer
      invoke ExitProcess,NULL
    end start
搜索更多相关主题的帖子: 数据 
2012-06-06 10:00
zklhp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:china
等 级:贵宾
威 望:254
帖 子:11485
专家分:33241
注 册:2007-7-10
收藏
得分:0 
你连错误信息都懒得帖我也懒得答
2012-06-06 10:04
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
不好意思
2012-06-06 10:06
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

D:\masm32>cmake
请输入需编译文件名:woca1
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

 Assembling: woca1.asm
woca1.asm(3) : error A2044: invalid character in file

***********
ASCII build
***********

d:\masm32\include\windows.inc(156) : error A2004: symbol type conflict : bool
d:\masm32\include\windows.inc(7835) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(7835) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9045) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9045) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9058) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9058) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9070) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9070) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9075) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9075) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9080) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9080) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9085) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9085) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9090) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9090) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9097) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9097) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9104) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9104) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9111) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9111) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9116) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9116) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9122) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9122) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9130) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9130) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9131) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9131) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9135) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9135) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9141) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9141) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9148) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9148) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9155) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9155) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9160) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9160) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9168) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9168) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9175) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9175) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9183) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9183) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9190) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9190) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9200) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9200) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9201) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9201) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9205) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9205) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9206) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9206) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9211) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9211) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9217) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9217) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9224) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9224) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9231) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9231) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9237) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9237) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9248) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9248) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9256) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9256) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9267) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9267) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9279) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9279) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9287) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9287) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9295) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9295) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9306) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9306) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9317) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9317) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9326) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9326) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9334) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9334) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9343) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9343) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9350) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9350) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9355) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9355) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9359) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9359) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9364) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9364) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9374) : error A2179: structure improperly initiali
zed
d:\masm32\include\windows.inc(9374) : error A2008: syntax error : in structure
d:\masm32\include\windows.inc(9393) : fatal error A1012: error count exceeds 100
; stopping assemb
错误信息太多了
2012-06-06 10:08
zklhp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:china
等 级:贵宾
威 望:254
帖 子:11485
专家分:33241
注 册:2007-7-10
收藏
得分:0 
编译错误 错误信息

运行错误 错在哪

难道还得我再编译 运行 或者一行一行的看给你找毛病么 我又不是你老师

与人方便 自己方便
2012-06-06 10:09
zklhp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:china
等 级:贵宾
威 望:254
帖 子:11485
专家分:33241
注 册:2007-7-10
收藏
得分:0 
头文件有问题 我感觉是编译器和头文件不配套

你用的啥工具啊
2012-06-06 10:10
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
masm32包里的,qeditor.exe,ml.exe,link.exe
2012-06-06 10:12
zklhp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:china
等 级:贵宾
威 望:254
帖 子:11485
专家分:33241
注 册:2007-7-10
收藏
得分:0 
woca1.asm(3) : error A2044: invalid character in file

这个很容易看 非法字符

认真看我下面打的两个冒号【:】【:】

程序只认英语 自然只认英语符号 短的那个是英语的

头文件的问题不是你的错 或者说不是代码的错
2012-06-06 10:12
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
有法改吗
2012-06-06 10:13
zklhp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:china
等 级:贵宾
威 望:254
帖 子:11485
专家分:33241
注 册:2007-7-10
收藏
得分:0 
以下是引用宾克斯drink在2012-6-6 10:12:40的发言:

masm32包里的,qeditor.exe,ml.exe,link.exe
没用过那玩意

我推荐你用masmplus 一键编译 里面用的也是masm32包 不过是测试过没问题的


2012-06-06 10:14
快速回复:新手求解下面小程序哪里出了问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.088491 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved