马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
代码如下:assume cs:code,ds:data
data segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,0b878h
mov es,ax
mov si,0
mov di,0
call letterc
mov ax,4c00h
int 21h
letterc:
mov al,[si]
cmp al,0
je exit
cmp al,'a'
jb s0
cmp al,'z'
ja s0
and al,11011111b
mov byte ptr [si],al
s0:
;显示白底黑字
mov byte ptr es:[di],al
mov byte ptr es:1[di],01110000b
inc si
add di,2
jmp short letterc
exit:
ret
code ends
end start
|