1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;Author:
3 ;comment: Blank
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5 ;input code
6  
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 sta segment stack
9 dw 40h dup(?)
10 top label word
11 sta ends
12
13 data segment
14 m dw 4,32,2,23,21,8,98,12,5
15 odd dw 10 dup(?)
16 event dw 10 dup(?)
17 crlf db 0dh,0ah,24h
18 data ends
19
20 code segment
21 assume cs:code,ds:data,ss:sta
22 main proc far
23 mov ax,sta
24 mov ss,ax
25 lea sp,top
26 mov ax,data
27 mov ds,ax
28
29 xor bx,bx
30 xor dx,dx
31 mov cx,10
32 mov si,0
33 mov di,0
34 mov bp,0
35 l10:
36 mov ax,m[si]
37 push ax
38 and ax,01h
39 cmp ax,0
40 je l20
41 pop ax
42 mov odd[di],ax
43 add di,2
44 add si,2
45 inc bx
46 loop l10
47 jmp l30
48
49 l20:
50 pop ax
51 mov event[bp],ax
52 add bp,2
53 add si,2
54 inc dx
55 loop l10
56
57 l30:
58 push dx
59 mov ah,9
60 lea dx,crlf
61 int 21h
62
63
64 mov cx,16
65 l40:
66 rol bx,1
67 mov dl,bl
68 and dl,1
69 add dl,30h
70 mov ah,2
71 int 21h
72 loop l40
73
74 mov ah,9
75 lea dx,crlf
76 int 21h
77
78 pop bx
79 mov cx,16
80 l50:
81 rol bx,1
82 mov dl,bl
83 and dl,1
84 add dl,30h
85 mov ah,2
86 int 21h
87 loop l50
88
89
90 mov ah,4ch
91 int 21h
92 main endp
93 code ends
94 end main

 

posted on 2010-06-19 00:18  KuSiuloong  阅读(169)  评论(0编辑  收藏  举报