TAHA
09-22-2009, 03:20 PM
پروژه كامل تبديل حروف بزرگ به حرف كوچيك وبرعكس
Stack segment stack
Db 100h dup (?)
stack ends
Data segment
strlist label byte
Max db 80
Len db ?
Data2 db 80 dup(?)
Msg1 db "enter number and digit"
data3 db 80 dup(?)
Data ends
Code segment
Assume cs:code,ds:data,ss:stack,es:data
Org 100h
mov ax,data
mov ds,ax
lea dx,msg1
Mov ah,09
Int 21h
lea ax,data3
mov si,ax
Lea di,data2
lea dx,strlist
mov ah,0ah
int 21h
Mov cl ,len
Back1: mov al,[di]
Cmp al ,"A"
Jb over
Cmp al,"z"
Ja over
Xor al,00100000b
Over: mov [si],al
Inc si
Inc di
Loop back1
lea dx,data3
mov ah,09
int 21h
Mov ah,4ch
Int 21h
Code ends
End
Stack segment stack
Db 100h dup (?)
stack ends
Data segment
strlist label byte
Max db 80
Len db ?
Data2 db 80 dup(?)
Msg1 db "enter number and digit"
data3 db 80 dup(?)
Data ends
Code segment
Assume cs:code,ds:data,ss:stack,es:data
Org 100h
mov ax,data
mov ds,ax
lea dx,msg1
Mov ah,09
Int 21h
lea ax,data3
mov si,ax
Lea di,data2
lea dx,strlist
mov ah,0ah
int 21h
Mov cl ,len
Back1: mov al,[di]
Cmp al ,"A"
Jb over
Cmp al,"z"
Ja over
Xor al,00100000b
Over: mov [si],al
Inc si
Inc di
Loop back1
lea dx,data3
mov ah,09
int 21h
Mov ah,4ch
Int 21h
Code ends
End