home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / mslang / biosasm / readme.txt < prev   
Text File  |  1991-08-20  |  5KB  |  102 lines

  1. ======================================================================
  2.    Microsoft Product Support Services Application Note (Text File)
  3.     HF0405: CALLING DOS AND BIOS INTERRUPTS WITH FORTRAN AND MASM
  4. ======================================================================
  5.                                                    Revision Date: 8/91
  6.                                                        1 Disk Included
  7.  
  8. This information applies to Microsoft FORTRAN versions 5.0 and 5.1.
  9.  
  10.  --------------------------------------------------------------------
  11. | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
  12. | ACCOMPANY THIS DOCUMENT (collectively referred to as an            |
  13. | Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY      |
  14. | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO    |
  15. | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A     |
  16. | PARTICULAR PURPOSE. The user assumes the entire risk as to the     |
  17. | accuracy and the use of this Application Note. This Application    |
  18. | Note may be copied and distributed subject to the following        |
  19. | conditions: 1) All text must be copied without modification and    |
  20. | all pages must be included; 2) If software is included, all files  |
  21. | on the disk(s) must be copied without modification [the MS-DOS(R)  |
  22. | utility DISKCOPY is appropriate for this purpose]; 3) All          |
  23. | components of this Application Note must be distributed together;  |
  24. | and 4) This Application Note may not be distributed for profit.    |
  25. |                                                                    |
  26. | Copyright 1991 Microsoft Corporation. All Rights Reserved.         |
  27. | Microsoft, MS-DOS, and the Microsoft logo are registered           |
  28. | trademarks and Windows is a trademark of Microsoft Corporation.    |
  29.  --------------------------------------------------------------------
  30.  
  31. This application note illustrates how to access DOS interrupts without
  32. using the functions INTDOS and INTDOSX. DOS and BIOS interrupts can
  33. be called by specifying the interrupt number and the input register
  34. values within the main program. INTERRUPT and INTERRUPTX differ from
  35. the INTDOS and INTDOSX routines included with FORTRAN in that
  36. interrupts other than interrupt 21 can be called.
  37.  
  38. Included on the enclosed "Calling DOS and BIOS Interrupts with FORTRAN
  39. and MASM" disk are the following files. These files define the
  40. INTERRUPT and INTERRUPTX functions and provide two FORTRAN sample
  41. programs demonstrating how these functions are called.
  42.  
  43. File           Description
  44. ----           -----------
  45.  
  46. INTERRPT.ASM   The assembly source listing of the INTERRUPT and
  47.                INTERRUPTX routines.
  48.  
  49. INTERRPT.INC   An include file for INTERRUPT and INTERRUPTX. This
  50.                file contains the INTERFACE to the assembly routines
  51.                and the register structures needed for INTERRUPT and
  52.                INTERRUPTX.
  53.  
  54. INTERRPT.OBJ   The preassembled version of INTERRPT.ASM to be linked
  55.                with programs calling INTERRUPT or INTERRUPTX.
  56.  
  57. INT.FOR        FORTRAN sample program that demonstrates how to use the
  58.                INTERRUPT function call. INT.FOR uses INT 21, function
  59.                2A hex to get the system date.
  60.  
  61. INTX.FOR       FORTRAN sample program using segment registers that
  62.                demonstrates how to use the INTERRUPTX function call.
  63.                INTXFOR uses INT 21, function 41 hex to delete a file.
  64.  
  65. INT.EXE        Executable version of INT.FOR example.
  66.  
  67. INTX.EXE       Executable version of INTX.FOR example.
  68.  
  69. The two assembly language routines included in INTERRPT.ASM are as
  70. follows:
  71.  
  72. 1. INTERRUPT(INTNUM,INREGS,OUTREGS) invokes the interrupt specified by
  73.    INTNUM using the values of INREGS and returns the result of the
  74.    interrupt call in OUTREGS.
  75.  
  76. 2. INTERRUPTX(INTNUM,INREGS,OUTREGS) invokes the system in the same
  77.    manner as INTERRUPT but accepts segment register values.
  78.  
  79. To use the INTERRUPT and INTERRUPTX functions, the statement
  80.  
  81.    INCLUDE 'INTERRPT.INC'
  82.  
  83. must be located at the top of the source file where a call is made to
  84. the assembly language procedures. The two statement function
  85. definitions documented at the end of the INTERRPT.INC file must be
  86. uncommented and added to the source code of any FORTRAN program,
  87. function, or subroutine block where the assembly language procedures
  88. are called.
  89.  
  90. The statement functions documented at the end of INTERRPT.INC are
  91. shown below. These statement functions must appear before any
  92. executable statements. INTERRPT.OBJ must then be linked with the
  93. object file produced from compiling the main program.
  94.  
  95.    gethibyte (dataword) = dataword / 256
  96.    getlobyte (dataword) = iand(dataword , 255)
  97.  
  98. Microsoft cannot guarantee that the information stated here regarding
  99. how to use INTERRUPT and INTERRUPTX will allow you to perform all MS-
  100. DOS system or BIOS calls correctly because this information has not
  101. been tested rigorously and is not considered a feature of the product.
  102.