|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code,ds:data,ss:stack
code segment
data segment
db 'welcome to masm!'
db 02h,24h,71h
data ends
stack segment
dw 8 dup(0)
stack ends
start: mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,10h
mov ax,0b872h
mov es,ax
mov bx,0
mov cx,3
mov bp,0
s: push cx
mov di,0
mov si,0
mov cx,16
s0:mov al,ds:[di]
mov es:[bx+si],al
inc di
mov al,ds:[10h+bp]
mov es:[bx+si+1],al
add si,2
loop s0
inc bp
pop cx
add bx,10h
loop s
mov ax,4c00h
int 21h
code ends
end start
出现图片显示的结果,是不是不对的,要是不对应该改代码哪里呢?
本帖最后由 3-3 于 2017-6-19 20:25 编辑 assume cs:code,ds:data,ss:stack
data segment
db 'welcome to masm!'
db 02h,24h,71h
data ends
stack segment
dw 8 dup(0)
stack ends
code segment
start: mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,10h
mov ax,0b872h
mov es,ax
mov bx,0
mov cx,3
mov bp,0
s: push cx
mov di,0
mov si,0
mov cx,16
s0:mov al,ds:[di]
mov es:[bx+si],al
inc di
mov al,ds:[10h+bp]
mov es:[bx+si+1],al
add si,2
loop s0
inc bp
pop cx
add bx,0a0h
loop s
mov ax,4c00h
int 21h
code ends
end start
修改你的代码,得到的图是正确的啊
|
-
|