+ -
当前位置:首页 → 问答吧 → 用tasm编译汇编程序出问题了

用tasm编译汇编程序出问题了

时间:2010-11-10

来源:互联网

用汇编语言写了如下程序:
assume cs:codesg
codesg segment
  mov ax,2000h
  mov ss,ax
  mov sp,0
  add sp,10
  pop ax
  pop bx
  push ax
  push bx
  pop ax
  pop bx

  mov ax,4c00h
  int 21h
codesg ends
end
文件保存为t1.asm文件
用tasm t1.asm编译成功了,产生了t1.obj文件
再用tlink t1.obj的时候出错,提示no program entry point
请高手指教是什么原因,没有产生.exe文件

作者: TwenteMaster   发布时间: 2010-11-10

没指定模式, 可指定为Tiny模式, 这样无须指定entry point
不然, 加一标号, 在end 之后写上作为入口的标号名称. 如start: ..... end start

作者: coohai   发布时间: 2010-11-10