| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1034 人关注过本帖
标题:如何使用masm8.2 ???
只看楼主 加入收藏
longfeng
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-7-4
收藏
 问题点数:0 回复次数:2 
如何使用masm8.2 ???

本人最近刚开始学汇编,装的是 masm8.2 安装完后,不知如何使用???
在 project 菜单下点击命令来运行过例题,但输入的书上的程序不能运行,没有任何反应.
书上的例题是以masm5.0为基础.
附程序如下:
prognam segment ;define code segment
main proc far
assume cs: prognam
start: ;starting execution addr

;set up stack for return
push ds ;save old data segment
sub ax,ax ;put zero in AX
push ax ;save zero on stack
;main part of program
mov ch,4 ;number of digits
rotate: mov cl,4 ;set count to 4 bits
rol bx,cl ;left digit to right
mov al,bl ;move to AL
and al,0fh ;mask off left digit
add al,30h ;convert hex to ASCII
cmp al,3ah ;is it>9?
jl printit ;jump if digit = 0 to 9
add al,7h ;digit is A to F
printit:
mov dl,al ;put ASCII char in DL
mov ah,2 ;display output funct
int 21h ;call DOS
dec ch ;done 4 digits?
jnz rotate ;not yet
ret ;return to DOS
main endp ;end of main part of prog.

prognam ends ;end of segment

end ;end of assembly

搜索更多相关主题的帖子: execution starting return 
2006-10-12 21:43
jhkdiy
Rank: 1
等 级:新手上路
帖 子:39
专家分:0
注 册:2006-9-24
收藏
得分:0 
直接使用masm5,然后在DOS窗口中自己键入编译和链接命令。因为masm32 8。0对dos程序的兼容性不好,会有不少莫明其妙的问题出现。
2006-10-14 00:41
longfeng
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-7-4
收藏
得分:0 
谢谢!!!
2006-10-14 20:20
快速回复:如何使用masm8.2 ???
数据加载中...
 
   



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

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