【汇编】三种方法实现装填中断子程序地址的代码

 1 CODE SEGMENT
 2     ASSUME CS:CODE
 3 INT_50H PROC FAR
 4     MOV CX,1000H
 5 L:    LOOP L
 6     IRET
 7 INT_50H ENDP
 8 BEGIN:
 9     PUSH DS
10     MOV AX,0
11     MOV DS,AX
12     MOV WORD PTR DS:[140H],OFFSET INT_50H
13     MOV WORD PTR DS:[142H],SEG INT_50H
14         MOV AH,4CH
15         INT 21H
16 CODE ENDS
17     END BEGIN
 1 CODE SEGMENT
 2     ASSUME CS:CODE
 3 INT_50H PROC FAR
 4     MOV CX,1000H
 5 L:    LOOP L
 6     IRET
 7 INT_50H ENDP
 8 BEGIN:
 9     PUSH DS
10     MOV AX,0
11     MOV DS,AX
12     LEA BX,INT_50H
13     MOV WORD PTR DS:[140H],BX
14     MOV AX,SEG INT_50H
15     MOV WORD PTR DS:[142H],AX
16         MOV AH,4CH
17         INT 21H
18 CODE ENDS
19     END BEGIN
 1 CODE SEGMENT
 2     ASSUME CS:CODE
 3 INT_50H PROC FAR
 4     MOV CX,1000H
 5 L:    LOOP L
 6     IRET
 7 INT_50H ENDP
 8 BEGIN:
 9     CLD
10     MOV AX,0
11     MOV ES,AX
12     MOV DI,50H*4
13     MOV AX,OFFSET INT_50H
14     STOSW
15     MOV AX,SEG INT_50H
16     STOSW
17 CODE ENDS
18     END BEGIN

用三种方法实现装填中断子程序地址的代码

posted @ 2016-04-03 15:48  隅子酱  阅读(809)  评论(0编辑  收藏  举报