马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我用了两层loop循环来实现,代码如下:
assume cs:code,ss:stack
data segment
db 'hello word!'
db 02h,24h,71h
db '!'
data ends
stack segment
dw 6 dup(0)
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,0b800h
mov es,ax
mov ax,stack
mov ss,ax
mov sp,12
mov cx,3
mov bx,0
mov si,0 ;string index
mov di,0 ;segment address
mov bp,0 ;display code
s:
push cx
mov dl,ds:[11+bp]
mov cx,11
s1:
mov al,[si]
mov es:[bx+di+7d0h],al
mov es:[bx+di+7d1h],dl
inc si
add bx,2
loop s1
mov si,0
mov bx,0
add di,0a0h
inc bp
pop cx
loop s
mov ax,4c00h
int 21h
code ends
end start
|