鸿 网 互 联 www.68idc.cn

王爽汇编语言第二版学习笔记之实验13(2)

来源:互联网 作者:佚名 时间:2015-08-13 07:42
1 程序: 2 assume cs: code 3 code segment 4 start: 5 mov ax,0b800h 6 mov es,ax 7 mov di, 160 * 12 + 16 * 2 8 mov bx,offset s-offset se 9 mov cx, 80 10 s: 11 mov byte ptr es: [di], ' ! ' 12 add di, 2 13 int 7ch 14 se: 15 nop 16 mov ax,4c00h
 1 程序:
 2 assume cs:code
 3 code segment
 4 start:
 5      mov ax,0b800h
 6      mov es,ax
 7      mov di,160*12+16*2
 8      mov bx,offset s-offset se
 9      mov cx,80
10 s:
11      mov byte ptr es:[di],'!'
12      add di,2
13      int 7ch
14 se:
15      nop
16      mov ax,4c00h
17      int 21h
18 code ends
19 end start
20 7ch中断例程:
21 assume cs:code
22 code segment
23 start:
24      mov ax,cs
25      mov ds,ax
26      mov si,offset do0
27      
28      mov ax,0
29      mov es,ax
30      mov di,200h
31      
32      mov cx,offset do0end-offset do0
33      cld
34      rep movsb
35      
36      mov ax,0
37      mov ds,ax
38      mov word ptr ds:[7ch*4],200H
39      mov word ptr ds:[7ch*4+2],0H
40      
41      mov ax,4c00h
42      int 21h
43      
44 do0:
45      dec cx
46      jcxz ok
47      push bp
48      mov bp,sp
49      add [bp+2],bx
50      pop bp
51 ok:
52      iret
53      
54 do0end:
55      nop
56      
57 code ends
58 end start

 

网友评论
<