主题:一个不能运行的汇编语言程序
各位好,初学汇编,遇到问题请教:
1、操作系统:WINDOWS XP HOME EDITION +SP2
2、汇编环境:MASM32 VERSION 8.2
3、源程序来源:
是百度搜索到的别人的简单屏打程序:
data segment
string db "hello world$"
data ends
code segment
assume cs:code,ds:data
start proc
mov ax,seg string
mov ds,ax
mov dx,offset string
mov ah,09h
int 21h
mov ax,4c00h
int 21h
start endp
code ends
end start
4、在MASM32的QEDITOR界面粘贴以上源程序,保存为 hello.asm ,并运行PROJECT下拉菜单中的ASSEMBLE&LINK选项后提示以下内容:
Assembling: C:\hello.asm
C:\hello.asm(10) : error A2004: symbol type conflict
C:\hello.asm(22) : warning A4023: with /coff switch, leading underscore required for start address : start
5、提示出错的第10行内容为:mov ax,seg string
提示出错的第22行内容为:end start
6、我的问题:为什么这个程序不能运行,是运行环境有问题还是源程序有问题?
谢谢。
1、操作系统:WINDOWS XP HOME EDITION +SP2
2、汇编环境:MASM32 VERSION 8.2
3、源程序来源:
是百度搜索到的别人的简单屏打程序:
data segment
string db "hello world$"
data ends
code segment
assume cs:code,ds:data
start proc
mov ax,seg string
mov ds,ax
mov dx,offset string
mov ah,09h
int 21h
mov ax,4c00h
int 21h
start endp
code ends
end start
4、在MASM32的QEDITOR界面粘贴以上源程序,保存为 hello.asm ,并运行PROJECT下拉菜单中的ASSEMBLE&LINK选项后提示以下内容:
Assembling: C:\hello.asm
C:\hello.asm(10) : error A2004: symbol type conflict
C:\hello.asm(22) : warning A4023: with /coff switch, leading underscore required for start address : start
5、提示出错的第10行内容为:mov ax,seg string
提示出错的第22行内容为:end start
6、我的问题:为什么这个程序不能运行,是运行环境有问题还是源程序有问题?
谢谢。