;       SCCSID = %W% %E%

        page    ,132
;/*****************************************************************************
;*
;* SOURCE FILE NAME = SCSUBRA.ASM
;*
;* DESCRIPTIVE NAME = OS2SCSI.DMD - OS/2 SCSI.SYS Emulation
;*
;*
;* COPYRIGHT    COPYRIGHT IBM CORPORATION, 1991, 1992
;*              LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
;*              REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
;*              RESTRICTED MATERIALS OF IBM
;*              IBM CONFIDENTIAL
;*
;* VERSION      V2.0
;*
;* DATE
;*
;* DESCRIPTION : Assembly helper routines
;*
;*
;* CHANGE ACTIVITY =
;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
;*   --------  ----------  -----  --------------------------------------
;*   04/01/93  @V65575     65575  Fix parameter stack offset - S_to_MS
;*
;*****************************************************************************/


        title   SCSUBRA - OS/2 2.0 OS2SCSI
        name    SCSUBRA


        .xlist
        include basemaca.inc
        .list


_DATA   segment dword public 'DATA'

_DATA   ends


Code    segment dword public 'CODE'
        assume  CS:Code,DS:_Data

        CPUMODE 386

;******************************************************************************
;*
;*  SUBROUTINE NAME:   MS_to_S
;*
;*  DESCRIPTIVE NAME: Convert form milisecond to second
;*
;*  FUNCTION:     Convert from milisecond to second
;*
;*  ENTRY POINT:  MS_to_S
;*
;*  LINKAGE:      Near
;*
;******************************************************************************


          public _MS_to_S
_MS_to_S proc near

        push    bp
        mov     bp,sp
        push    ebx
        mov     ax,[bp+6]
        shl     eax,16
        mov     ax,[bp+4]
        xor     edx,edx
        mov     ebx,1000
        div     ebx
        or      edx,edx
        jz      not_inc
        inc     ax
not_inc:
        push    ax
        shr     eax,16
        mov     dx,ax
        pop     ax
        pop     ebx
        pop     bp
        ret

_MS_to_S endp


;******************************************************************************
;*
;*  SUBROUTINE NAME:   S_to_MS
;*
;*  DESCRIPTIVE NAME: Convert form second to milisecond
;*
;*  FUNCTION:     Convert from second to milisecond
;*
;*  ENTRY POINT:  S_to_MS
;*
;*  LINKAGE:      Near
;*
;******************************************************************************


          public _S_to_MS
_S_to_MS proc near

        push    bp
        mov     bp,sp
        push    ebx
        mov     eax,[bp+4]                                              ;@V65575
        xor     edx,edx
        mov     ebx,1000
        mul     ebx
        push    ax
        shr     eax,16
        mov     dx,ax
        pop     ax
        pop     ebx
        pop     bp
        ret

_S_to_MS endp

Code            ends

                end
