试验9 材料编程
;参考了小甲鱼的设置段地址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,
;mov characters and colors
mov si, 0
mov di, 0
mov cx, 16
s0:
mov al, ;characters
mov es:, 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
页:
[1]