Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem porting FORTRAN program from DOS



Hi Eric,

A small google on the DOS int21 3301 function (13057 is 3301 hex), showed that it is a 'Set Ctrl-C Check Flag' function.
Maybe this bit of information can help you further.


Best regards,
Sander

On 31-jan-05, at 10:13, Eric LEROY wrote:

  I am trying to port an old FORTRAN program that was developped to be executable on PC DOS. It written in standard FORTRAN 77 excepted in a subroutine where there is a call to a BIOS interuption 21H. The call is :

 CALL DOS21H(13057,0,1)

With the sources, an assembly source is also provided for this subroutine DOS21H which is :

 ;      Copyright (c) CSIRO Chemical Physics 1985
 ;
 ; FORTRAN: CALL DOS21H(JAX,JCX,JDX)
 ;  loads the INTEGER*2 FORTRAN vars
 ;  JAX,JCX and JDX into
 ;  CPU registers AX,CX and DX
 ;  then calls INT 21H
 ;  then loads the resulting values
 ;  of AX,CX,DX into JAX,JCX,JDX
 ;  and returns

 DATA SEGMENT PUBLIC 'DATA'
 DATA ENDS
 DGROUP GROUP DATA
 CODE SEGMENT 'CODE'
     ASSUME CS:CODE,DS:DGROUP,SS:DGROUP
 PUBLIC DOS21H
 DOS21H    PROC    FAR
     PUSH    BP
     MOV     BP,SP
     LES    BX,[BP+14]
     MOV    AX,ES:[BX]
     LES    BX,[BP+10]
     MOV    CX,ES:[BX]
     LES    BX,[BP+6]
     MOV    DX,ES:[BX]
     INT    21H
     LES    BX,[BP+14]
     MOV    ES:[BX],AX
     LES    BX,[BP+10]
     MOV    ES:[BX],CX
     LES    BX,[BP+6]
     MOV    ES:[BX],DX
     MOV    SP,BP
     POP    BP
     RET    0CH
     DOS21H    ENDP
 CODE ENDS

I cannot find the purpose of this interuption call and if I try to compile the source without this call, the compilation is successfull but the execution never ends.

 Thank you for your help

 Best regards
                           \\_//
                           -(@ @)-
  ----------------------oOO--(_)--Ooo-------------------------

        Eric LEROY Dr.
        Laboratoire de Chimie Metallurgique des Terres Rares
        UPR 209 - CNRS
        Groupe des Laboratoires de Thiais
        2-8, rue Henri Dunant
        94320 THIAIS cedex

        Tel   : (33) (0)1 49 78 12 09 ou 13 24
        Fax   : (33) (0)1 49 78 12 03
        email : email@hidden
        http://www.glvt-cnrs.fr/microscope
  ------------------------------Oooo.-------------------------
                  .oooO         (   )
                  (   )          ) /
                   \ (          (_/
                    \_)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Fortran-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/fortran-dev/ email@hidden


This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Fortran-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/fortran-dev/email@hidden

This email sent to email@hidden
References: 
 >Problem porting FORTRAN program from DOS (From: Eric LEROY <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.