assume cs:code,ds:data
data segment
db "Beingner's All-purpose Symbolic Instruction Code",0
data ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0
mov dh,8 ;行号
mov dl,3 ;列号
call letterc
mov ah,4ch
int 21h
letterc: ;若是字母则变成大写
mov al,ds:[si]
cmp al,'a'
ja continue
jmp next ;这句的思想
continue:
cmp al,'z'
jb ok
jmp next ;这句的思想
ok:
and byte ptr[si],11011111b
next:
inc si
mov ah,0
mov cx,ax
jcxz xxx
jmp letterc
xxx:
call show_str
show_str: ;显示字符串
mov di,0
mov ax,0
mov al,160
mul dh
mov bx,ax
mov ax,0
mov al,2
mul dl
add ax,bx
mov si,ax
mov ax,0b800h
mov es,ax
mov bl,00001000b
s:
mov cl,[di]
mov es:[si],cl
inc si
inc di
mov es:[si],bl
inc si
mov ch,0
jcxz finsh
jmp s
finsh:
ret
code ends
end start