LNH_Sniper 发表于 2011-6-9 07:46:08

输出字符串的小程序

本帖最后由 loop 于 2011-6-9 12:00 编辑

sseg segment stack
dw 100h dup (0)
sseg ends

dseg segment
msg db 'hello,EveryBody!',0dh,0ah,'$'
dseg ends

cseg segment
assume cs:cseg, ds:dseg, ss:sseg
start:
mov ax,dseg
mov ds,ax
mov dx,offset msg
mov ah,9
int 21h
mov ax,4ch
int 21h
cseg ends
end start这段程序,我通过debug 能在内存中找到字符串,
但程序运行,字符串确显示不出来,请问下这是怎么回事?望各位朋友帮忙解决下

winddyj 发表于 2011-6-9 09:30:28

mov ax,4c00h
int 21h

仰望天上的光 发表于 2011-6-9 11:38:56

17.mov ax,4ch
改为
mov ax,4c00h

mov ah,4ch

LNH_Sniper 发表于 2011-6-9 11:51:00

winddyj 发表于 2011-6-9 09:30 static/image/common/back.gif
mov ax,4c00h
int 21h

已经解决 谢谢

LNH_Sniper 发表于 2011-6-9 12:00:50

仰望天上的光 发表于 2011-6-9 11:38 static/image/common/back.gif
17.mov ax,4ch
改为
mov ax,4c00h


已经解决 谢谢
页: [1]
查看完整版本: 输出字符串的小程序