| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1569 人关注过本帖
标题:新手求解下面小程序哪里出了问题
取消只看楼主 加入收藏
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
 问题点数:0 回复次数:10 
新手求解下面小程序哪里出了问题
.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
宾克斯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
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
masm32包里的,qeditor.exe,ml.exe,link.exe
2012-06-06 10:12
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
有法改吗
2012-06-06 10:13
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
哦,我把那些命令用批处理弄过了,觉得还可以用,就这个程序恼了我半天
2012-06-06 10:17
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
以下是引用zklhp在2012-6-6 10:23:14的发言:

对了 你先改了我上面说的冒号问题再说。。
那个,冒号怎么改,改哪里的
2012-06-06 10:25
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
改成下面这样,运行就没问题---!,怎么回事  


  .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
szFmt       db  '结果是:%d',0
text          db    10,20,30,40
buffer      db    10 dup(0)
        .code
start:
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,al
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:29
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
以下是引用zklhp在2012-6-6 10:28:12的发言:

woca1.asm(3)

这个3表示第三行 你看看你程序的第三行是什么
噢噢,好了,谢谢
2012-06-06 10:31
宾克斯drink
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2012-6-6
收藏
得分:0 
太马虎了,自己给自己找麻烦
2012-06-06 10:32
快速回复:新手求解下面小程序哪里出了问题
数据加载中...
 
   



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

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