-
Notifications
You must be signed in to change notification settings - Fork 0
/
s12.asm
53 lines (38 loc) · 909 Bytes
/
s12.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
assume cs:code
code segment
start: mov ax,0b800h
mov ds,ax
mov di,0
mov si,0
mov cx,2000
s: mov al,ds:[di]
cmp al,'z'+1
jb next
call qita
p: add si,2
add di,2
loop s
mov ax,4c00h
int 21h
next:cmp al,'A'-1
ja next1
call qita
next1:cmp al,'Z'+1
jb da
cmp al,'a'-1
ja xiao
call qita
da:mov ah,1010b
mov ds:[si+1],ah
mov ds:[si],al
jmp p
xiao:mov ah,1001b
mov ds:[si+1],ah
mov ds:[si],al
jmp p
qita: mov ah,0b
mov ds:[si+1],ah
mov ds:[si],al
jmp p
code ends
end start