- UID
- 65325
注册时间2010-2-1
阅读权限20
最后登录1970-1-1
以武会友
 
TA的每日心情 | 郁闷 2017-1-19 11:18 |
---|
签到天数: 6 天 [LV.2]偶尔看看I
|
本帖最后由 komany 于 2010-12-22 10:12 编辑
- assume cs:code
- data segment
- Nisy db 'Hello,Nisy!$'
- Komany db 'Hello,komany!$'
- China db 'Hello,China!$'
- ASM db 'Hello,ASM!$'
- data ends
- code segment
- start:
- mov ax,data
- mov ds,ax
- call fun_1
- call fun_2
- call fun_3
- call fun_4
- mov ax,4c00h
- int 21h
- fun_1: push cx
- push si
- push dx
- mov cx,11
- mov si,0
- mov bx,offset Nisy
- s1: mov al,[bx+si]
- cmp al,2ch
- jz next1
- cmp al,'!'
- jz next1
- and al,11011111b
- mov [bx+si],al
- next1: inc si
- loop s1
- mov ax,0900h
- mov dx,offset Nisy
- int 21h
- pop dx
- pop si
- pop cx
- retn
- fun_2: push cx
- push si
- push dx
- mov cx,13
- mov si,0
- mov bx,offset Komany
- s2: mov al,[bx+si]
- cmp al,2ch
- jz next2
- cmp al,'!'
- jz next2
- and al,11011111b
- mov [bx+si],al
- next2:
- inc si
- loop s2
- mov ax,0900h
- mov dx,offset Komany
- int 21h
- pop dx
- pop si
- pop cx
- retn
- fun_3: push cx
- push si
- push dx
- mov cx,12
- mov si,0
- mov bx,offset China
- s3: mov al,[bx+si]
- cmp al,2ch
- jz next3
- cmp al,'!'
- jz next3
- and al,11011111b
- mov [bx+si],al
- next3: inc si
- loop s3
- mov ax,0900h
- mov dx,offset China
- int 21h
- pop dx
- pop si
- pop cx
- retn
- fun_4: push cx
- push si
- push dx
- mov cx,10
- mov si,0
- mov bx,offset ASM
- s4: mov al,[bx+si]
- cmp al,2ch
- jz next4
- cmp al,'!'
- jz next4
- and al,11011111b
- mov [bx+si],al
- next4: inc si
- loop s4
- mov ax,0900h
- mov dx,offset ASM
- int 21h
- pop dx
- pop si
- pop cx
- retn
- code ends
- end start
复制代码 |
|