home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cdisk.zip / PARALLEL / DRVSTART.LST < prev    next >
File List  |  1993-03-26  |  2KB  |  61 lines

  1. Microsoft (R) Macro Assembler Version 6.00                 03/26/93 02:55:26
  2. drvstart.asm                             Page 1 - 1
  3.  
  4.  
  5.                 ;
  6.                 ;    C Startup routine for parallel device driver
  7.                 ;
  8.                     EXTRN      _main:near
  9.                       EXTRN   _timr_handler:near
  10.                       PUBLIC  _STRATEGY
  11.                     PUBLIC  __acrtused
  12.                       PUBLIC  _TIMER_HANDLER
  13.  
  14.  0000                _DATA    segment     word public 'DATA'
  15.  0000                _DATA    ends
  16.  
  17.  0000                CONST    segment     word public 'CONST'
  18.  0000                CONST    ends
  19.  
  20.  0000                _BSS    segment     word public 'BSS'
  21.  0000                _BSS    ends
  22.  
  23.                 DGROUP     group     CONST, _BSS, _DATA
  24.  
  25.  0000                _TEXT    segment     word public 'CODE'
  26.  
  27.                       assume        cs:_TEXT, ds:DGROUP, es:NOTHING, ss:NOTHING
  28.                       .286
  29.  
  30.  0000                _STRATEGY proc    far
  31.  0000                __acrtused:            ;to satisfy C 
  32.  
  33.  0000                start:
  34.  0000  06                  push        es    ; &reqpacket high part
  35.  0001  53                  push        bx    ; &reqpacket low part
  36.  0002  E8 0000 E              call        _main
  37.  0005  5B                  pop          bx
  38.  0006  07                  pop          es
  39.  0007  26: 89 47 03              mov          word ptr es:[bx+3],ax  ; plug in status word
  40.  000B  CB                  ret
  41.  000C                _STRATEGY endp
  42.                 ;
  43.  000C                _TIMER_HANDLER proc     far
  44.                 ;
  45.  000C  60                  pusha            ;save flags, regs
  46.  000D  1E                    push      ds
  47.  000E  06                    push        es    ;make up for the 'almost all' push
  48.  000F  E8 0000 E              call        _timr_handler ;handle interrupts
  49.  0012  07                    pop          es
  50.  0013  1F                    pop       ds
  51.  0014  61                  popa            ;restore everything and
  52.  0015  CB                    ret            ;bail out
  53.                 ;
  54.  0016                _TIMER_HANDLER endp
  55.  
  56.  
  57.  0016                _TEXT      ends
  58.                       end
  59.  
  60.  
  61.