汇编ASCII大小写转换(字符串长度$的用法)

data segment    
     first db "BaSiC"
     db "iNfOrMaTiOn"
     len equ $-first        ;×Ö·û´®³¤¶È
ends

code segment
start:
    mov ax, data
    mov ds, ax
        
    mov cx,len
    xor bx,bx
    s:       
    ;or [bx],20h     ;תΪСд
    and [bx],11011111b    ;תΪ´óд
    inc bx    
    loop s
    
        
    ;lea dx, pkey
    ;mov ah, 9
    ;int 21h        ; output string at ds:dx
    
    ; wait for any key....    
    ;mov ah, 1
    ;int 21h
    
    mov ax, 4c00h ; exit to operating system.
    int 21h    
ends

end start ; set entry point and stop the assembler.
原文地址:https://www.cnblogs.com/wucg/p/4448264.html