-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBaitap3.asm
49 lines (43 loc) · 830 Bytes
/
Baitap3.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;Nhap vao chu cai
;neu chu hoa bien thanh chu cai thuong
;neu chu cai thuong bien thanh chu cai hoa
.model small
.stack 50
.data
str1 DB 10,13, 'Nhap vao chu cai:$'
xuong db 10, 13 , "$"
.code
main proc
mov ax, @data
mov ds,ax
Lap:
mov ah,09
lea dx,str1
int 21h
mov ah,01h
int 21h
cmp al,'A'
JL Lap
cmp al,'z'
Ja Lap
cmp al,'Z'
Jl Low
cmp al,'a'
JL Lap
cmp al,'z'
JL Up
Up:
and al,11011111b
mov dl,al
mov ah,02
int 21h
JMP Exit1
Low:
add al,32
mov ah,02
int 21h
Exit1:
mov ah,4CH
int 21h
main endp
end main