鸿 网 互 联 www.68idc.cn

王爽汇编语言第二版学习笔记之实验12

来源:互联网 作者:佚名 时间:2015-08-13 07:38
1 assume cs: code 2 code segment 3 start: 4 mov ax,cs 5 mov ds,ax 6 mov si,offset do0 7 8 mov ax, 0 9 mov es,ax 10 mov di,200h 11 12 mov cx,offset do0end-offset do0 13 cld 14 rep movsb 15 16 mov ax, 0 17 mov ds,ax 18 mov word ptr ds: [ 0 ]
 1 assume cs:code
 2 code segment
 3 start:
 4     mov ax,cs
 5     mov ds,ax
 6     mov si,offset do0
 7     
 8     mov ax,0
 9     mov es,ax
10     mov di,200h
11     
12     mov cx,offset do0end-offset do0
13     cld
14     rep movsb
15     
16     mov ax,0
17     mov ds,ax
18     mov word ptr ds:[0],200H
19     mov word ptr ds:[2],0H
20     
21     mov ax,4c00h
22     int 21h
23     
24 do0:
25     jmp short do1
26     db "divide error"
27 do1:
28     mov ax,cs
29     mov ds,ax
30     mov si,202H
31     
32     mov ax,0b800H
33     mov es,ax
34     mov di,12*160+16*2
35     
36     mov cx,13
37 s:    mov al,[si]
38     mov es:[di],al
39     mov byte ptr es:[di+1],02H
40     inc si
41     add di,2
42     loop s
43     
44     mov ax,4c00h
45     int 21h
46     
47 do0end:
48     nop
49     
50 code ends
51 end start

 

网友评论
<