Ignore:
Timestamp:
Jul 3, 2010, 7:26:36 PM (15 years ago)
Author:
David Azarewicz
Message:

Added status idc function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/drv32/startup.asm

    r375 r493  
    1 ; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ 
     1; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $
    22;*
    33;* 16bit entrypoints to the PDD with thunks to the 32bit functions
     
    5252                public _RM_Help3
    5353                public _RMFlags
     54IFDEF DEBUG
     55                public DbgU32TimerCnt
     56                public DbgU32IntCnt
     57ENDIF
    5458
    5559;*********************************************************************************************
     
    123127InitPktSeg      dw 0
    124128InitPktOff      dw 0
     129IFDEF DEBUG
     130DbgU32TimerCnt dd 0
     131DbgU32IntCnt dd 0
     132ENDIF
    125133;needed for rmcalls.lib
    126134_RM_Help0       dd 0
     
    165173        cmp     eax, 04h                        ; DosRead
    166174        je      uniaud_stub_strategy
    167        
     175
    168176        enter   0, 0
    169177        and     sp, 0fffch                      ; align stack
    170178
    171         pushad 
     179        pushad
    172180        push    ds
    173181        push    es
     
    235243        and     sp, 0fffch                      ; align stack
    236244
    237         pushad 
     245        pushad
    238246        push    ds
    239247        push    es
     
    328336; device_init
    329337;
    330 ; Use DosOpen to tell the 1st driver to handle init for us. We must do it this 
     338; Use DosOpen to tell the 1st driver to handle init for us. We must do it this
    331339; way since right now our CPL is 3 and the flat code selector has DPL 0, so
    332340; we can't load it. In the open strategy request, CPL is 0
     
    600608                call    near ptr _CallRM
    601609                mov     sp,bp
    602                 ret16     
     610                ret16
    603611DeAllocL1:      test    byte ptr _RMFlags,02H
    604612                je      short DeAllocL2
    605613                sub     ax,ax
    606                 ret16     
     614                ret16
    607615DeAllocL2:      mov     ax,0001H
    608                 ret16     
     616                ret16
    609617_RMDeallocResourceOrg endp
    610618
     
    622630
    623631                ALIGN 2
    624                 PUBLIC  MY_DEVHELP_ATTACHDD 
     632                PUBLIC  MY_DEVHELP_ATTACHDD
    625633MY_DEVHELP_ATTACHDD proc near
    626634                push    bp
     
    638646                pop     es
    639647                pop     di
    640                 leave   
     648                leave
    641649                ret     0004H
    642650L2:             pop     es
     
    659667                call    near ptr _CallRM
    660668                add     sp,0006H
    661                 ret16     
     669                ret16
    662670CreateDrL4:     test    byte ptr _RMFlags,02H
    663671                je      short CreateDrL6
     
    670678                pop     bx
    671679                pop     es
    672                 ret16     
     680                ret16
    673681CreateDrL6:     mov     ax, word ptr DevHelpInit + 2H
    674682                or      ax, word ptr DevHelpInit
    675683                jne     short CreateDrL7
    676684                mov     ax,0008H
    677                 ret16   
     685                ret16
    678686CreateDrL7:     push    offset ResMgr
    679687                push    offset _RMIDCTable
     
    708716
    709717                ALIGN 2
    710                 PUBLIC  _CallRM 
     718                PUBLIC  _CallRM
    711719_CallRM proc near
    712720                enter   0002H,00H
     
    719727                call    dword ptr _RM_Help3
    720728                add     sp,0006H
    721                 leave   
     729                leave
    722730                ret
    723731L1:             push    word ptr +6H[bp]
    724732                call    dword ptr _RM_Help0
    725                 leave   
     733                leave
    726734                ret
    727735_CallRM endp
     
    733741                pop     word ptr -2H[bp]
    734742                mov     ax,word ptr -2H[bp]
    735                 leave   
    736                 ret     
     743                leave
     744                ret
    737745_GetCS endp
    738746
     
    754762                je      short DestroyDrvL2
    755763                sub     ax,ax
    756                 ret16   
     764                ret16
    757765DestroyDrvL2:   mov     ax,0001H
    758766                ret16
     
    788796GetNodeInfo_L1: mov     ax,0014H
    789797                ret16
    790                 nop     
     798                nop
    791799GetNodeInfo_L2: test    byte ptr _RMFlags,02H
    792800                je      short GetNodeInfo_L3
     
    799807                ALIGN 2
    800808                PUBLIC  _RMGetNodeInfo16
    801 _RMGetNodeInfo16  proc far 
     809_RMGetNodeInfo16  proc far
    802810                enter32
    803811                xor     eax, eax
     
    825833                mov     sp,bp
    826834                ret16
    827 RMDevIDToHandleList_L1:             
     835RMDevIDToHandleList_L1:
    828836                mov     ax,0014H
    829837                ret16
    830                 nop     
    831 RMDevIDToHandleList_L2:             
     838                nop
     839RMDevIDToHandleList_L2:
    832840                test    byte ptr _RMFlags,02H
    833841                je      short RMDevIDToHandleList_L3
    834842                sub     ax,ax
    835843                ret16
    836                 nop     
    837 RMDevIDToHandleList_L3: 
     844                nop
     845RMDevIDToHandleList_L3:
    838846                mov     ax,0001H
    839847                ret16
    840                 nop     
     848                nop
    841849_RMDevIDToHandleListOrg endp
    842850
    843851                ALIGN 2
    844852                PUBLIC  _RMDevIDToHandleList16
    845 _RMDevIDToHandleList16  proc far 
     853_RMDevIDToHandleList16  proc far
    846854                enter32
    847855                xor     eax, eax
     
    874882                call    near ptr _CallRM
    875883                ret16
    876                 nop     
     884                nop
    877885RMHandleToResourceHandleList_L1:
    878886                mov     ax,0014H
    879887                ret16
    880                 nop     
     888                nop
    881889RMHandleToResourceHandleList_L2:
    882890                test    byte ptr _RMFlags,02H
     
    884892                sub     ax,ax
    885893                ret16
    886                 nop     
     894                nop
    887895RMHandleToResourceHandleList_L3:
    888896                 mov     ax,0001H
    889897                ret16
    890                 nop     
     898                nop
    891899_RMHandleToResourceHandleListOrg endp
    892900
    893901                ALIGN 2
    894902                PUBLIC  _RMHandleToResourceHandleList16
    895 _RMHandleToResourceHandleList16  proc far 
     903_RMHandleToResourceHandleList16  proc far
    896904                enter32
    897905                xor     eax, eax
     
    10821090        shr     edx, 13
    10831091        and     edx, 3
    1084        
     1092
    10851093        ;has the OS/2 kernel finally changed the DPL to 0?
    10861094        cmp     edx, 0
     
    10891097        mov     SelRef, 0
    10901098        jmp     short @@endchange
    1091        
     1099
    10921100@@changedpl:
    10931101        mov     oldDPL, eax
     
    11011109        inc     SelRef
    11021110@@fixdpl_end:
    1103         ret       
    1104 FixSelDPL endp       
     1111        ret
     1112FixSelDPL endp
    11051113;;******************************************************************************
    11061114; RestoreSelDPL:
     
    11141122        cmp     fWrongDPL, 1
    11151123        jne     short @@restdpl_end
    1116        
     1124
    11171125        cmp     SelRef, 1
    11181126        jne     short @@restdpl_endrest
     
    11381146;*******************************************************************************
    11391147;Copy parameters to 16 bits stack and call 16:32 IDC handler
    1140 ; 
     1148;
    11411149; Paramters: IDC16_HANDLER pHandler
    11421150;            ULONG         cmd
     
    11591167        call fword ptr [ebx]
    11601168        add  sp, 12
    1161        
     1169
    11621170        DevThunkStackTo32_Int
    11631171
     
    11981206        cmp     eax, 0
    11991207        jne     @@stackswitchfail_strat
    1200            
     1208
    12011209        call    ALSA_STRATEGY
    12021210
     
    12241232;*******************************************************************************
    12251233        ALIGN 4
    1226 IDC_ proc far       
     1234IDC_ proc far
    12271235        push    ds
    12281236        push    es
     
    12611269;*******************************************************************************
    12621270        ALIGN 4
    1263 TIMER_ proc far       
     1271TIMER_ proc far
    12641272        push    ds
    12651273        push    es
     
    12711279        mov     es, eax
    12721280
     1281IFDEF DEBUG
     1282        add     DbgU32TimerCnt, 1
     1283ENDIF
     1284
    12731285IFDEF FLATSTACK
    12741286        DevThunkStackTo32
     
    12851297        int     3
    12861298        call    ALSA_TIMER_
     1299ENDIF
     1300IFDEF DEBUG
     1301        add     DbgU32TimerCnt, -1
    12871302ENDIF
    12881303
     
    13161331
    13171332        pushfd
     1333
     1334IFDEF DEBUG
     1335                add         DbgU32IntCnt, 1
     1336ENDIF
     1337
    13181338        ; At this point a cli is redundant
    13191339        ; we enter the interrupt handler with interrupts disabled.
     
    13291349
    13301350        DevThunkStackTo16
    1331        
     1351
    13321352@@stackswitchfail_irq:
    13331353ELSE
     
    13361356ENDIF
    13371357
     1358IFDEF DEBUG
     1359                add         DbgU32IntCnt, -1
     1360ENDIF
     1361
    13381362        ;restore flags
    13391363        popfd
     
    13481372
    13491373endofirq:
    1350        
     1374
    13511375        pop     gs
    13521376        pop     fs
     
    15341558
    15351559    stackbase dd 0
    1536     stacksel  dd 0   
     1560    stacksel  dd 0
    15371561ELSE
    15381562
     
    15601584    _MSG_TABLE32     dw OFFSET  DATA16:_MSG_TABLE16
    15611585                     dw SEG     DATA16:_MSG_TABLE16
    1562          
    1563 ;16:16 address of driver name   
     1586
     1587;16:16 address of driver name
    15641588    PDDName          dw OFFSET  DATA16:pddname16
    15651589                     dw SEG     DATA16:pddname16
Note: See TracChangeset for help on using the changeset viewer.