-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBTTL2.asm
54 lines (44 loc) · 818 Bytes
/
BTTL2.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
50
51
52
53
54
.model small
.stack 50
.data
str1 DB 10,13, 'Nhap vao chu cai:$'
str2 DB 10,13, 'Ky tu da doi:$'
ktu DB ?
.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:
sub al,32
mov ktu,al
jmp Exit1
Low:
add al,32
mov ktu,al
Exit1:
lea dx,str2
mov ah,9
int 21h
mov dl,ktu
mov ah,02
int 21h
mov ah,4CH
int 21h
main endp
end main