asm实现大小写转换
效果图,在地址76c:0这里本来是abc的,上代码
assume ds:data,cs:code data segment db 'abc' data ends;data block but the data will be saved in memory block 76c:0 code segment start: mov ax,data mov ds,ax mov cx,3h mov bx,0h ;the [bx] is stable it can't be others like [ax] [dx] s: mov al,ds:[bx] sub al,20h mov ds:[bx],al inc bx ;bx=bx-1,bx-- loop s ;it's a loop jmp exit; jmp to other code block memory exit: mov ax,4c00h int 21h code ends end start