org 100h
.data
dt1 dB 'COMPUTER'
dt2 db 8 dup(0)
.code
mov ax,@data
mov ds,ax
mov si,offset dt1
mov di,offset dt2
MOV BL,20H
MOV CX,08
label:
MOV AL,[si]
ADD AL,BL
MOV [DI],Al
INC SI
INC DI
LOOP label
hlt
another way :-
-to convert small Character to capital Character only when find
org 100h
.DATA
DT1 DB 'University Of Technology'
DT2 DB 24 DUP(0)
.CODE
MOV AX,@DATA
MOV DS,AX
MOV SI,OFFSET DT1
MOV DI,OFFSET DT2
MOV BX,0000H
MOV CX,18H
A:MOV AL,[SI+BX]
CMP AL,'a'
JGE L
JMP X
L:CMP AL,'z'
JLE L1
JMP X
L1:SUB AL,20H
X:MOV [DI+BX],AL
INC BX
LOOP A
HLT
0 التعليقات:
إرسال تعليق