|
发表于 2014-2-27 15:32:47
|
显示全部楼层
只是显示了黑底绿字,看我的代码:- assume cs:codesg, ds:datasg, ss:stacksg
- datasg segment
- db "welcome to masm!"
- db 2h, 24H, 71h
- datasg ends
- stacksg segment
- dw 8 dup(0)
- stacksg ends
- codesg segment
- start: mov ax, datasg
- mov ds, ax
- mov ax, 0b86eh
- mov es, ax
- mov ax, stacksg
- mov ss, ax
- mov sp, 16
- mov bx, 0
- mov si, 0
- mov di, 0
- mov bp, 0
- mov cx, 3
- s1: push cx
- mov cx, 16
- mov ah, ds:[bp+16]
- inc bp
- s: mov al, ds:[di]
- inc di
- mov es:[si+bx+40H], ax
- add si, 2
- loop s
- mov si, 0
- mov di, 0
- add bx, 160
- pop cx
- loop s1
- mov ax, 4c00h
- int 21h
- codesg ends
- end start
复制代码 |
|