帮帮忙,求你们了,纠结三天了!
assume cs:code,ds:xinyi,ss:startxinyi segment
db 'welcome to masm!'
db 0ah,2ch,79h
xinyi ends
start segment
dw 0,0,0,0,0,0,0,0
start ends
code segment
data:mov ax,start
mov ss,ax
mov ax,10h
mov sp,ax
mov di,0
mov bx,16
mov si,0
mov ax,xinyi
mov ds,ax
s: mov ax,
push ax
mov ax,
push ax
mov dx,0b800h
mov ds,dx
pop ax
mov ,ax
inc si
pop ax
mov ,ax
inc di
loop s
inc bx
jmp short s
mov ah, 0
int 16h
mov ax,4c00h
int 21h
code ends
end data
帮忙看下怎么错了
我想在屏幕上显示welcome to masm!
建议,重新仔仔细细的看一边视频,遇到写代码的片段,
暂停一下,老老实实的重头写代码,领会其中的用法
循环用的 cx 哪里去了??
cx存放循环次数的。。。。 这个帖子不错···回复指出了错误和问题原因··我等受教了···:big 真心没看懂你这程序,凌乱,问题多多!
assume cs:code
data segment
db 'welcome to masm!',0
data ends
code segment
start:mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str:mov ax,0b800h
mov es,ax
mov al,160
mov ah,0
mul dh
mov bx,ax
mov al,2
mov ah,0
mul dl
add bx,ax
mov al,cl
s:mov cl,ds:
jcxz ok
mov es:,cl
mov es:,al
add bx,2
inc si
jmp short s
ok:ret
code ends
end start
这是我写的,不敢说多严谨,起码能实现你想要的功能!
页:
[1]