王爽汇编实验九

assume cs:code,ds:data,ss:stack

data segment
db 3 dup (‘wweellccoommee ttoo mmaassmm!!’) ;比较变态
data ends

stack segment
dw 0,0,0,0,0,0,0,0
stack ends

code segment
start:mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,16
mov ax,0b800h
mov es,ax
mov bx,780h

mov di,1
mov cx,16
t1:mov byte ptr 00h[di],02h
mov byte ptr 20h[di],24h
mov byte ptr 40h[di],71h
add di,2
loop t1 ;集中设置颜色

mov cx,3
mov di,0
s1:push cx
mov cx,16
mov si,0
s:mov ax,[di]
mov es:[bx].40h[si],ax
add si,2
add di,2
loop s
add bx,0a0h
pop cx
loop s1 ;将字符放入屏幕中央

mov ax,4c00h
int 21h
code ends
end start
其实,还有更简单的方法,就这么着吧!

Related

Leave a comment

Your comment