yearn2005 发表于 2013-6-7 23:48:55

奇怪的问题。

实验9 代码生成s9.exe后,有个奇怪的问题 。先进入一次DEBUG,再运行s9.exe 一切正常。如果进入DOS就直接运行S9.exe就没任何回显。 以下是截图。

yearn2005 发表于 2013-6-7 23:53:20

代码如下 有兴趣的鱼油测试下

assume cs:codesg,ds:datasg
datasg segment

   db 'welcome to masm!'
   db '02h,24h,71h,47h'      ;这行要不要无所谓的
   datasg ends
   
codesg segment

       start:mov ax,datasg
                   mov ds,ax
                           mov si,0         
                           
                           mov ax,0b872h
                           mov es,ax
                           mov di,0            
                        
                        mov cx,16
                           
                s:         mov al,ds:
                           mov ah,24h
                           mov es:,ax
                           mov ah,71h
                           mov es:,ax
                           mov ah,47h
                           mov es:,ax
                           add si,1
                           add di,2
                           loop s
                           
                           mov ax,4c00h
                           int 21h
                           
                         codesg ends
                         endstart         

lsh華 发表于 2013-6-8 12:47:54

无回帖,不论坛,这才是人道。

海柯 发表于 2013-6-9 07:52:10

这就好比c语言中没有system ()一样,程序停不下来!就返回到shell

harvin 发表于 2013-6-13 15:20:37

帮忙顶下··········

s0512 发表于 2013-6-13 17:41:25

用COMMAND试试。。
页: [1]
查看完整版本: 奇怪的问题。