|
楼主 |
发表于 2012-5-24 17:41:27
|
显示全部楼层
光说废话了 上代码:
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 bx, 0
mov cx, 3
s: push cx
push ax
mov es, ax
mov di, 0
mov si, 0
mov cx, 16
s0:
mov al, ds:[si]
mov es:[di], al
mov al, ds:[10h + bx]
mov es:[di + 1], al
inc si
add di, 2
loop s0
pop ax
add bx, 1
add ax, 0ah
pop cx
loop s
mov ax, 4c00h
int 21h
code ends
end start
:D
|
|