|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
;参考了小甲鱼的设置段地址
assume cs: codesg
data segment
db 'Welcome to masm!'
db 02h, 24h, 71h
data ends
stack segment
dw 0
stack ends
codesg segment
start:
mov ax, data
mov ds, ax
mov ax, stack
mov ss, ax
mov sp, 2
mov bx, 0B872H
mov cx, 3
s:
push cx
push bx
;display segment
mov es, bx
;color
mov si, 13H
sub si, cx
mov ah, [si]
;mov characters and colors
mov si, 0
mov di, 0
mov cx, 16
s0:
mov al, [si] ;characters
mov es:[di], ax
inc si
add di, 2
loop s0
;modify bx data
pop bx
add bx, 0AH
pop cx
loop s;next line
mov ax, 4c00h
int 21h
codesg ends
end start |
|