终于在cmd窗口里出现了颜色了!!!感动ing……
October 6, 2013
masm
在窗口的中央打印三行字。
要求:
第一行绿色字
第二行绿底红色
第三行白底蓝色
assume cs:code, ds:data
data segment
db 'welcome to masm!'
data ends
code segment
start:
mov ax, data
mov ds, ax
mov ax, 0b800h
mov es, ax
mov di, 780h
mov si, 0
mov cx, 10h
s:
mov bp, si
add bp, bp
mov al, ds:[si]
mov es:[di+bp+40h], al
mov al, 24h
mov es:[di+bp+41h], al
inc si
loop s
mov di, 6e0h
mov si, 0
mov cx, 10h
s0:
mov bp, si
add bp, bp
mov al, ds:[si]
mov es:[di+bp+40h], al
mov al, 2h
mov es:[di+bp+41h], al
inc si
loop s0
mov di, 820h
mov si, 0
mov cx, 10h
s1:
mov bp, si
add bp, bp
mov al, ds:[si]
mov es:[di+bp+40h], al
mov al, 71h
mov es:[di+bp+41h], al
inc si
loop s1
mov ax, 4c00h
int 21h
code ends
end start
截图记录下这历史性的一刻=_=
O(∩_∩)O哈哈~