获取中断向量的简易程序 王建民 1994-01-07 程序经汇编、连接、再用“EXE2BIN”转换为“COM”文件即可。 TYPE INTO__FF.ASM CODE SEGMENT ASSUME CS:CODE,DS:CODE ORG 100H START: JMP BEGIN INT DB' INT(' INTH DB'OOH)=' SEG DB'OOOO' OFF DB 'OOOO:',OAH,ODH,'$' BEGIN: MOV AX,OO MOV ES,AX ;ES指向向量段 MOV SI,OO MOV CX,OO LOOP1: MOV DX,ES ;取向量偏移地址 LEA BX,OFF MOV AH,4 CALL H__OUT MOV DX,ES ;取向量段基址 LEA BX,SEG MOV AH,4 CALL H__OUT MOV DH,CL ;取向量号 MOV DL,OO LEA BX,INTH MOV AH,2 CALL H__OUT LEA DX,INT MOV AH,09 ;显示 INT 21H ADD SI,4 INC CX CMP CL,00 JNE LOOP1 MOV AH,4CH INT 21H H___OUT PROC NEAR ;16进制数转ASCII码 PUSH CX LOOP2: MOV CL,4 ROL DX,CL MOV AL,DL AND AL,OFH DAA ADD AL,OFOH ADC AL,40H MOV ,AL INC BX DEC AH CMP AH,OO JNE LOOP2 POP CX RET H__OUT ENDP CODE ENDS END START 王建民