NAME TQWheresTrap87 EXTRN TQ_TRAP87:far UGROUP GROUP UTSCODE UTSCODE SEGMENT PUBLIC 'CODE' ASSUME CS:UTSCODE ;;; This routine allows you to run the output of Intel's Pascal 86 ; and Fortran 86 on the IBM PC. It replaces "TQWheresTrap87" in ; the runtime libraries for Intel's Pascal 86 and Fortran 86. ; ; To perform the replacement, either place this object module in ; the link sequence before the runtime libraries, or use LIB86 ; to replace the module in Intel's runtime libraries. ; ; The function of TQWheresTrap87 is to tell the rest of the system ; where to place the interrupt vector for 8087 exception interrupts. ; The default routine supplied with Intel's tools places this at ; interrupt vector 10H, which is also used by the IBM PC for the ; entry to the CRT output routine. The Pascal and Fortran runtime ; libraries initialize this vector whether floating point is used ; or not. This new routine tells the system that it should not ; initialize any vector for 8087 exceptions. ; ; Note: This routine will allow you to run Fortran and Pascal code ; which does not contain floating point operations. Intel's 8087 ; emulator uses additional reserved interrupt vectors which conflict ; with the interrupt vectors used by the IBM PC. Using this routine, ; it may be possible to run floating point code when using an actual ; 8087 chip in the IBM PC, but this has not be attempted. PUBLIC TQWheresTrap87 TQWheresTrap87 PROC FAR PUSH BP MOV BP,SP LES BX,dword ptr [BP+6] MOV ES:[BX],offset UGROUP: TQ_Trap87 ;This is the routine MOV ES:[BX+2],seg TQ_Trap87 ;used by the runtine package ;to process 8087 exceptions. MOV AX,0 ;Returning 0 in AX specifies that no ; interrupt vector is to be used. ; If one were to be used, the number ; of that interrupt would be returned ; in AX. POP BP RET 4 TQWHeresTrap87 ENDP UTSCODE ENDS END